Commit 3666c1f7cac1ea8450e71d81d7ff0676abccd047

Sam Lantinga 2013-12-23T10:54:27

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

1
2
3
4
5
6
7
8
9
10
11
12
13
diff --git a/src/core/windows/SDL_windows.c b/src/core/windows/SDL_windows.c
index 6ac86a6..8de46a7 100644
--- a/src/core/windows/SDL_windows.c
+++ b/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! */