Files
spice2x.github.io/src/spice2x/rawinput/hotplug.h
T
bicarus 2dea0d27bf rawinput: fix hotplug for keyboard and mouse (#810)
## 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.
2026-07-18 17:38:59 -07:00

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);
};
}