Explorar o código

Explicitly initialize COM with multi-threaded support.
This is the safest option for applications that use COM, multi-threaded or not.

Sam Lantinga %!s(int64=11) %!d(string=hai) anos
pai
achega
3666c1f7ca
Modificáronse 1 ficheiros con 1 adicións e 1 borrados
  1. 1 1
      src/core/windows/SDL_windows.c

+ 1 - 1
src/core/windows/SDL_windows.c

@@ -45,7 +45,7 @@ WIN_SetError(const char *prefix)
 HRESULT
 WIN_CoInitialize(void)
 {
-    const HRESULT hr = CoInitialize(NULL);
+    const HRESULT hr = CoInitializeEx(NULL, COINIT_MULTITHREADED);
 
     /* S_FALSE means success, but someone else already initialized. */
     /* You still need to call CoUninitialize in this case! */