mirror of
https://github.com/moonlight-stream/moonlight-qt.git
synced 2026-10-20 15:27:17 +00:00
Flush stale gamepad events after checking for unmapped gamepads
This commit is contained in:
1 parent
cf544a8703
commit
8a87a09947
1 file changed
+4
@@ -955,6 +955,10 @@ QString SdlInputHandler::getUnmappedGamepads()
|
||||
|
||||
SDL_QuitSubSystem(SDL_INIT_GAMECONTROLLER);
|
||||
|
||||
// Flush stale events so they aren't processed by the main session event loop
|
||||
SDL_FlushEvents(SDL_JOYDEVICEADDED, SDL_JOYDEVICEREMOVED);
|
||||
SDL_FlushEvents(SDL_CONTROLLERDEVICEADDED, SDL_CONTROLLERDEVICEREMAPPED);
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user