Make sure we don't try to use the XInput DLL after it's unloaded
Steam ran into a crash SDL_XINPUT_JoystickDetect() with XINPUTGETCAPABILITIES being NULL. I'm not sure how that happened, and there may still be a race condition if this is a multi-threaded issue, but at least this is more correct. (cherry picked from commit0ae4fd0ec9) (cherry picked from commitee3b2b7de1)
This commit is contained in:
1 parent
ed86b02df8
commit
a9fdbf7f21
1 file changed
+1
@@ -458,6 +458,7 @@ void SDL_XINPUT_JoystickClose(SDL_Joystick *joystick)
|
|||||||
void SDL_XINPUT_JoystickQuit(void)
|
void SDL_XINPUT_JoystickQuit(void)
|
||||||
{
|
{
|
||||||
if (s_bXInputEnabled) {
|
if (s_bXInputEnabled) {
|
||||||
|
s_bXInputEnabled = SDL_FALSE;
|
||||||
WIN_UnloadXInputDLL();
|
WIN_UnloadXInputDLL();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in new issue
Block a user