Workaround for crash in CoUninitialize()
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42
diff --git a/src/joystick/windows/SDL_dinputjoystick.c b/src/joystick/windows/SDL_dinputjoystick.c
index c2f53a9..caf627a 100644
--- a/src/joystick/windows/SDL_dinputjoystick.c
+++ b/src/joystick/windows/SDL_dinputjoystick.c
@@ -1147,7 +1147,8 @@ SDL_DINPUT_JoystickQuit(void)
}
if (coinitialized) {
- WIN_CoUninitialize();
+ /* Workaround for CoUninitialize() crash in NotifyInitializeSpied() */
+ /*WIN_CoUninitialize();*/
coinitialized = SDL_FALSE;
}
}
diff --git a/src/joystick/windows/SDL_rawinputjoystick.c b/src/joystick/windows/SDL_rawinputjoystick.c
index e63c747..c4de681 100644
--- a/src/joystick/windows/SDL_rawinputjoystick.c
+++ b/src/joystick/windows/SDL_rawinputjoystick.c
@@ -657,7 +657,8 @@ RAWINPUT_QuitWindowsGamingInput(RAWINPUT_DeviceContext *ctx)
__x_ABI_CWindows_CGaming_CInput_CIGamepadStatics_Release(wgi_state.gamepad_statics);
wgi_state.gamepad_statics = NULL;
}
- WIN_CoUninitialize();
+ /* Workaround for CoUninitialize() crash in NotifyInitializeSpied() */
+ /*WIN_CoUninitialize();*/
wgi_state.initialized = SDL_FALSE;
}
}
diff --git a/src/joystick/windows/SDL_windowsjoystick.c b/src/joystick/windows/SDL_windowsjoystick.c
index 7dae16d..35a4e9c 100644
--- a/src/joystick/windows/SDL_windowsjoystick.c
+++ b/src/joystick/windows/SDL_windowsjoystick.c
@@ -256,7 +256,8 @@ SDL_CleanupDeviceNotification(SDL_DeviceNotificationData *data)
UnregisterClass(data->wincl.lpszClassName, data->wincl.hInstance);
if (data->coinitialized == S_OK) {
- WIN_CoUninitialize();
+ /* Workaround for CoUninitialize() crash in NotifyInitializeSpied() */
+ /*WIN_CoUninitialize();*/
}
}