Explicitly initialize COM with multi-threaded support.
authorSam Lantinga <slouken@libsdl.org>
Mon, 23 Dec 2013 10:54:27 -0800
changeset 8065 fcca53e02c81
parent 8064 ac809ea54d63
child 8066 658b461d81be
Explicitly initialize COM with multi-threaded support. This is the safest option for applications that use COM, multi-threaded or not.
src/core/windows/SDL_windows.c
--- a/src/core/windows/SDL_windows.c	Mon Dec 16 10:03:26 2013 -0300
+++ b/src/core/windows/SDL_windows.c	Mon Dec 23 10:54:27 2013 -0800
@@ -45,7 +45,7 @@
 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! */