mirror of
https://github.com/Ryujinx/SDL.git
synced 2024-12-23 05:15:28 +00:00
Fixed infinite loop shutting down WGI controllers
We are guaranteed that the lock will be held during shutdown, so if we are in InvokeRemoved(), it's because we're shutting down controllers and need to remove them from our internal list. Fixes https://github.com/libsdl-org/SDL/issues/7016 (cherry picked from commit ac99db9fc8d528a79abb98a5641e0fd94aa20a9e)
This commit is contained in:
parent
0d5467a6e9
commit
ebc2fb411f
|
@ -414,7 +414,7 @@ static HRESULT STDMETHODCALLTYPE IEventHandler_CRawGameControllerVtbl_InvokeRemo
|
||||||
SDL_LockJoysticks();
|
SDL_LockJoysticks();
|
||||||
|
|
||||||
/* Can we get delayed calls to InvokeRemoved() after WGI_JoystickQuit()? */
|
/* Can we get delayed calls to InvokeRemoved() after WGI_JoystickQuit()? */
|
||||||
if (SDL_JoysticksQuitting() || !SDL_JoysticksInitialized()) {
|
if (!SDL_JoysticksInitialized()) {
|
||||||
SDL_UnlockJoysticks();
|
SDL_UnlockJoysticks();
|
||||||
return S_OK;
|
return S_OK;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue