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.
This commit is contained in:
bicarus authored and GitHub committed 2026-07-18 17:38:59 -07:00
1 parent 61a0220c1a
commit 2dea0d27bf
3 files changed
+45 -19

No files matched your search

+2 -1
View File
@@ -246,7 +246,8 @@ void rawinput::RawInputManager::devices_scan_rawinput(const std::string &device_
return;
}
// iterate devices
// hotplug gives us an interface path rather than a RawInput handle, so find its
// matching entry; an empty path means this is a full device scan
for (UINT device_cur_index = 0; device_cur_index < device_no; device_cur_index++) {
auto device = &device_list.get()[device_cur_index];
if (device_name.length() == 0) {