diff options
author | Stanislaw Halik <sthalik@misaki.pl> | 2014-09-17 08:07:09 +0200 |
---|---|---|
committer | Stanislaw Halik <sthalik@misaki.pl> | 2014-09-17 08:07:09 +0200 |
commit | 4fdc2d9b3733f2b8d3edd4e10fdba0b7a525ae22 (patch) | |
tree | cac0338508cfee78e09fb1b522b4bd450fc5624e /facetracknoir/main.cpp | |
parent | fff539163e23c687ef32d61aa91c16b2e616ec63 (diff) |
initialize COM on _WIN32 as per Win32 API
For API correctness only. It worked without issues since ever.
Diffstat (limited to 'facetracknoir/main.cpp')
-rw-r--r-- | facetracknoir/main.cpp | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/facetracknoir/main.cpp b/facetracknoir/main.cpp index 7462f8c2..694715d1 100644 --- a/facetracknoir/main.cpp +++ b/facetracknoir/main.cpp @@ -2,8 +2,16 @@ #include <QApplication> #include <memory> +#ifdef _WIN32 +# include <objbase.h> +#endif + int main(int argc, char** argv) { +#ifdef _WIN32 + CoInitializeEx(NULL, COINIT_MULTITHREADED); +#endif + QApplication::setAttribute(Qt::AA_X11InitThreads, true); QApplication app(argc, argv); auto w = std::make_shared<FaceTrackNoIR>(); |