diff options
author | Stanislaw Halik <sthalik@misaki.pl> | 2016-08-12 17:03:51 +0200 |
---|---|---|
committer | Stanislaw Halik <sthalik@misaki.pl> | 2016-08-12 17:03:51 +0200 |
commit | eda47922d9bd6d10e4e2fb3d3191edfaa126aef5 (patch) | |
tree | 86cef123f082a743275842d0c110dfa3d6115020 /opentrack-dinput | |
parent | 0ed45348c428a950db589caa227efa86af499170 (diff) |
few: use existing com threading init function
Diffstat (limited to 'opentrack-dinput')
-rw-r--r-- | opentrack-dinput/dinput.cpp | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/opentrack-dinput/dinput.cpp b/opentrack-dinput/dinput.cpp index 06b5e4f2..217df6a7 100644 --- a/opentrack-dinput/dinput.cpp +++ b/opentrack-dinput/dinput.cpp @@ -1,6 +1,7 @@ #ifdef _WIN32 #include "dinput.hpp" +#include "opentrack-compat/win32-com.hpp" #include <QDebug> std::atomic<int> dinput_handle::refcnt; @@ -9,9 +10,7 @@ dinput_handle::di_t dinput_handle::handle(dinput_handle::make_di()); LPDIRECTINPUT8& dinput_handle::init_di() { - HRESULT hr = CoInitializeEx(NULL, COINIT_MULTITHREADED); - if (FAILED(hr)) - qDebug() << "dinput: failed CoInitializeEx" << hr << GetLastError(); + init_com_threading(com_multithreaded); static LPDIRECTINPUT8 di_ = nullptr; if (di_ == nullptr) |