summaryrefslogtreecommitdiffhomepage
path: root/compat/camera-names.cpp
diff options
context:
space:
mode:
authorStanislaw Halik <sthalik@misaki.pl>2016-08-17 21:40:22 +0200
committerStanislaw Halik <sthalik@misaki.pl>2016-08-17 22:32:03 +0200
commit62c137157ed04d08e6bcc7a741bcdb046943776f (patch)
tree8f717bd5fa9fdda743f08677544e8cd5c9f9fef2 /compat/camera-names.cpp
parentfad4b316af2cde1a5988ed1bbdbc4ba5933e88df (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/camera-names.cpp')
-rw-r--r--compat/camera-names.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/compat/camera-names.cpp b/compat/camera-names.cpp
index 21ff3b52..2f4c2f91 100644
--- a/compat/camera-names.cpp
+++ b/compat/camera-names.cpp
@@ -33,7 +33,7 @@ OPENTRACK_COMPAT_EXPORT QList<QString> get_camera_names()
#if defined(_WIN32)
// Create the System Device Enumerator.
HRESULT hr;
- init_com_threading(com_apartment);
+ init_com_threading();
ICreateDevEnum *pSysDevEnum = NULL;
hr = CoCreateInstance(CLSID_SystemDeviceEnum, NULL, CLSCTX_INPROC_SERVER, IID_ICreateDevEnum, (void **)&pSysDevEnum);
if (FAILED(hr))