diff options
author | Stanislaw Halik <sthalik@misaki.pl> | 2016-09-16 17:01:24 +0200 |
---|---|---|
committer | Stanislaw Halik <sthalik@misaki.pl> | 2016-09-16 17:53:40 +0200 |
commit | a5167736460bac22010333cfe7530a5fa50d2c70 (patch) | |
tree | ff4c5885483b06f347df37fb19fa97e6047ae959 /compat/camera-names.cpp | |
parent | 7e97b1b0ee2d93aeb70b0c50954ff08e1f0eca71 (diff) |
compat, dinput: don't overdo COM logic
Diffstat (limited to 'compat/camera-names.cpp')
-rw-r--r-- | compat/camera-names.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/compat/camera-names.cpp b/compat/camera-names.cpp index 2f4c2f91..add8c094 100644 --- a/compat/camera-names.cpp +++ b/compat/camera-names.cpp @@ -3,7 +3,6 @@ #ifdef _WIN32 # define NO_DSHOW_STRSAFE # include <dshow.h> -# include "win32-com.hpp" # include <cwchar> #elif defined(__unix) || defined(__linux) || defined(__APPLE__) # include <unistd.h> @@ -33,7 +32,7 @@ OPENTRACK_COMPAT_EXPORT QList<QString> get_camera_names() #if defined(_WIN32) // Create the System Device Enumerator. HRESULT hr; - init_com_threading(); + CoInitialize(nullptr); ICreateDevEnum *pSysDevEnum = NULL; hr = CoCreateInstance(CLSID_SystemDeviceEnum, NULL, CLSCTX_INPROC_SERVER, IID_ICreateDevEnum, (void **)&pSysDevEnum); if (FAILED(hr)) @@ -49,7 +48,8 @@ OPENTRACK_COMPAT_EXPORT QList<QString> get_camera_names() // Enumerate the monikers. IMoniker *pMoniker = NULL; ULONG cFetched; - while (pEnumCat->Next(1, &pMoniker, &cFetched) == S_OK) { + while (pEnumCat->Next(1, &pMoniker, &cFetched) == S_OK) + { IPropertyBag *pPropBag; hr = pMoniker->BindToStorage(0, 0, IID_IPropertyBag, (void **)&pPropBag); if (SUCCEEDED(hr)) { |