mirror of
https://github.com/spice2x/spice2x.github.io.git
synced 2026-12-05 03:16:41 -08:00
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:
1 parent
61a0220c1a
commit
2dea0d27bf
3 files changed
+45
-19
No files matched your search
@@ -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) {
|
||||
|
||||
Reference in new issue
Block a user