diff options
author | Stanislaw Halik <sthalik@misaki.pl> | 2016-08-17 21:40:22 +0200 |
---|---|---|
committer | Stanislaw Halik <sthalik@misaki.pl> | 2016-08-17 22:32:03 +0200 |
commit | 62c137157ed04d08e6bcc7a741bcdb046943776f (patch) | |
tree | 8f717bd5fa9fdda743f08677544e8cd5c9f9fef2 /compat/win32-com.hpp | |
parent | fad4b316af2cde1a5988ed1bbdbc4ba5933e88df (diff) |
compat/win32-com: default to right COM type without caller specifying it
The main window always needs the apartment threaded context for OLE used by
Qt. Default to apartment threaded before a QApplication is created, or if the
thread is the QApplication thread. Use multithreaded COM otherwise.
Diffstat (limited to 'compat/win32-com.hpp')
-rw-r--r-- | compat/win32-com.hpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/compat/win32-com.hpp b/compat/win32-com.hpp index 4e535815..fe2b478f 100644 --- a/compat/win32-com.hpp +++ b/compat/win32-com.hpp @@ -11,8 +11,9 @@ enum com_type : int { com_multithreaded = COINIT_MULTITHREADED, com_apartment = COINIT_APARTMENTTHREADED, + com_invalid = 0, }; -bool OPENTRACK_COMPAT_EXPORT init_com_threading(com_type t); +bool OPENTRACK_COMPAT_EXPORT init_com_threading(com_type t = com_invalid); #endif |