Fixed an issue where xinput devices were bound to the wrong xbox port under some circumstances after hotplug removal events

This commit is contained in:
ergo720 2021-05-24 12:02:11 +02:00
parent 1ed640a0d7
commit f3251128e8
2 changed files with 3 additions and 2 deletions

View File

@ -108,7 +108,6 @@ namespace Sdl
}
else if (Event.type == SDL_JOYDEVICEREMOVED) {
CloseSdlDevice(Event.jdevice.which);
g_InputDeviceManager.HotplugHandler(true);
}
else if (Event.type == SDL_JOYAXISMOTION ||
Event.type == SDL_JOYHATMOTION ||

View File

@ -1928,7 +1928,9 @@ static LRESULT WINAPI EmuMsgProc(HWND hWnd, UINT msg, WPARAM wParam, LPARAM lPar
{
// sent by rawinput when it detects changes for the registered device types
g_InputDeviceManager.HotplugHandler(false);
if (wParam == GIDC_ARRIVAL) {
g_InputDeviceManager.HotplugHandler(false);
}
return DefWindowProc(hWnd, msg, wParam, lParam);
}
break;