mirror of
https://github.com/libsdl-org/SDL.git
synced 2026-06-06 06:34:35 +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
This commit is contained in:
parent
f53d797cca
commit
ac99db9fc8
1 changed files with 1 additions and 1 deletions
|
|
@ -410,7 +410,7 @@ static HRESULT STDMETHODCALLTYPE IEventHandler_CRawGameControllerVtbl_InvokeRemo
|
|||
SDL_LockJoysticks();
|
||||
|
||||
/* Can we get delayed calls to InvokeRemoved() after WGI_JoystickQuit()? */
|
||||
if (SDL_JoysticksQuitting() || !SDL_JoysticksInitialized()) {
|
||||
if (!SDL_JoysticksInitialized()) {
|
||||
SDL_UnlockJoysticks();
|
||||
return S_OK;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue