Workaround for crash in CoUninitialize()

This commit is contained in:
Sam Lantinga 2022-02-21 16:24:45 -08:00
parent 978fbc3250
commit 9299a3e796
3 changed files with 6 additions and 3 deletions

View File

@ -1147,7 +1147,8 @@ SDL_DINPUT_JoystickQuit(void)
} }
if (coinitialized) { if (coinitialized) {
WIN_CoUninitialize(); /* Workaround for CoUninitialize() crash in NotifyInitializeSpied() */
/*WIN_CoUninitialize();*/
coinitialized = SDL_FALSE; coinitialized = SDL_FALSE;
} }
} }

View File

@ -657,7 +657,8 @@ RAWINPUT_QuitWindowsGamingInput(RAWINPUT_DeviceContext *ctx)
__x_ABI_CWindows_CGaming_CInput_CIGamepadStatics_Release(wgi_state.gamepad_statics); __x_ABI_CWindows_CGaming_CInput_CIGamepadStatics_Release(wgi_state.gamepad_statics);
wgi_state.gamepad_statics = NULL; wgi_state.gamepad_statics = NULL;
} }
WIN_CoUninitialize(); /* Workaround for CoUninitialize() crash in NotifyInitializeSpied() */
/*WIN_CoUninitialize();*/
wgi_state.initialized = SDL_FALSE; wgi_state.initialized = SDL_FALSE;
} }
} }

View File

@ -256,7 +256,8 @@ SDL_CleanupDeviceNotification(SDL_DeviceNotificationData *data)
UnregisterClass(data->wincl.lpszClassName, data->wincl.hInstance); UnregisterClass(data->wincl.lpszClassName, data->wincl.hInstance);
if (data->coinitialized == S_OK) { if (data->coinitialized == S_OK) {
WIN_CoUninitialize(); /* Workaround for CoUninitialize() crash in NotifyInitializeSpied() */
/*WIN_CoUninitialize();*/
} }
} }