mirror of
https://github.com/spice2x/spice2x.github.io.git
synced 2026-08-01 14:20:42 -07:00
2dea0d27bf
## Link to GitHub Issue or related Pull Request, if one exists n/a ## Description of change Fix a long-standing issue of hotplug not working for keyboards and mice. The code only registered for HID notifications; we also need to do it for the keyboard GUID and mouse GUID. ## Testing Confirmed that keyboards and mice can be hot unplugged and plugged.
23 lines
475 B
C++
23 lines
475 B
C++
#pragma once
|
|
|
|
#include <windows.h>
|
|
|
|
namespace rawinput {
|
|
|
|
class RawInputManager;
|
|
|
|
class HotplugManager {
|
|
private:
|
|
RawInputManager *ri_mgr;
|
|
HANDLE hotplug_hid = nullptr;
|
|
HANDLE hotplug_keyboard = nullptr;
|
|
HANDLE hotplug_mouse = nullptr;
|
|
|
|
public:
|
|
HotplugManager(RawInputManager *ri_mgr, HWND hwnd);
|
|
~HotplugManager();
|
|
|
|
LRESULT CALLBACK WndProc(HWND hWnd, UINT msg, WPARAM wParam, LPARAM lParam);
|
|
};
|
|
}
|