From 0027139d8348e07e6a2d9734489964961294fe22 Mon Sep 17 00:00:00 2001 From: Stanislaw Halik Date: Sat, 30 Aug 2014 10:19:10 +0200 Subject: remove MSVC support Leave as-is to avoid unconditionally assuming GNU extensions and ABI --- facetracknoir/main.cpp | 26 -------------------------- 1 file changed, 26 deletions(-) (limited to 'facetracknoir/main.cpp') diff --git a/facetracknoir/main.cpp b/facetracknoir/main.cpp index 3143a093..9bf11b32 100644 --- a/facetracknoir/main.cpp +++ b/facetracknoir/main.cpp @@ -32,34 +32,8 @@ #include #include -#if defined(_WIN32) && defined(_MSC_VER) -# include -# ifdef OPENTRACK_BREAKPAD -# include -using namespace google_breakpad; -bool dumpCallback(const wchar_t* dump_path, - const wchar_t* minidump_id, - void* context, - EXCEPTION_POINTERS* exinfo, - MDRawAssertionInfo* assertion, - bool succeeded) -{ - MessageBoxA(GetDesktopWindow(), - "Generating crash dump!\r\n" - "Please send the .dmp file to to help us improve the code.", - "opentrack crashed :(", - MB_OK | MB_ICONERROR); - return succeeded; -} - -# endif -#endif - int main(int argc, char** argv) { -#if defined(OPENTRACK_BREAKPAD) && defined(_MSC_VER) - auto handler = new ExceptionHandler(L".", nullptr, dumpCallback, nullptr, -1); -#endif QApplication::setAttribute(Qt::AA_X11InitThreads, true); QApplication app(argc, argv); auto w = std::make_shared(); -- cgit v1.2.3 From be9901c4cc21597bcd28aebcc95ed488a5a7c172 Mon Sep 17 00:00:00 2001 From: Stanislaw Halik Date: Sat, 13 Sep 2014 13:27:11 +0200 Subject: Remove incorrect ownership --- facetracknoir/main.cpp | 33 +-------------------------------- 1 file changed, 1 insertion(+), 32 deletions(-) (limited to 'facetracknoir/main.cpp') diff --git a/facetracknoir/main.cpp b/facetracknoir/main.cpp index 9bf11b32..7462f8c2 100644 --- a/facetracknoir/main.cpp +++ b/facetracknoir/main.cpp @@ -1,35 +1,5 @@ -/******************************************************************************** -* FaceTrackNoIR This program is a private project of the some enthusiastic * -* gamers from Holland, who don't like to pay much for * -* head-tracking. * -* * -* Copyright (C) 2010 Wim Vriend (Developing) * -* Ron Hendriks (Researching and Testing) * -* * -* Homepage * -* * -* This program is free software; you can redistribute it and/or modify it * -* under the terms of the GNU General Public License as published by the * -* Free Software Foundation; either version 3 of the License, or (at your * -* option) any later version. * -* * -* This program is distributed in the hope that it will be useful, but * -* WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY * -* or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for * -* more details. * -* * -* You should have received a copy of the GNU General Public License along * -* with this program; if not, see . * -*********************************************************************************/ - #include "facetracknoir.h" -#include "tracker.h" #include -#include -#include -#include -#include -#include #include int main(int argc, char** argv) @@ -41,6 +11,5 @@ int main(int argc, char** argv) w->show(); app.exec(); - return 0; + return 0; } - -- cgit v1.2.3 From 4fdc2d9b3733f2b8d3edd4e10fdba0b7a525ae22 Mon Sep 17 00:00:00 2001 From: Stanislaw Halik Date: Wed, 17 Sep 2014 08:07:09 +0200 Subject: initialize COM on _WIN32 as per Win32 API For API correctness only. It worked without issues since ever. --- facetracknoir/main.cpp | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'facetracknoir/main.cpp') 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 #include +#ifdef _WIN32 +# include +#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(); -- cgit v1.2.3 From 73a6c374bd9233b2f1fd9696a69983bb3b7d5563 Mon Sep 17 00:00:00 2001 From: Stanislaw Halik Date: Thu, 18 Sep 2014 04:20:20 +0200 Subject: Revert "initialize COM on _WIN32 as per Win32 API" This reverts commit 03e4d58bbbbfb5d841354a34a2e2dc317b189deb. Issue: #53 Ironically breaks Windows open/save dialogs --- facetracknoir/main.cpp | 8 -------- 1 file changed, 8 deletions(-) (limited to 'facetracknoir/main.cpp') diff --git a/facetracknoir/main.cpp b/facetracknoir/main.cpp index 694715d1..7462f8c2 100644 --- a/facetracknoir/main.cpp +++ b/facetracknoir/main.cpp @@ -2,16 +2,8 @@ #include #include -#ifdef _WIN32 -# include -#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(); -- cgit v1.2.3 From 8e2aba0a468c189a6eb733fe3fab5b7889abb7ba Mon Sep 17 00:00:00 2001 From: Stanislaw Halik Date: Sun, 21 Sep 2014 19:42:26 +0200 Subject: use more savory UI style on win32 --- facetracknoir/main.cpp | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) (limited to 'facetracknoir/main.cpp') diff --git a/facetracknoir/main.cpp b/facetracknoir/main.cpp index 7462f8c2..aa33522d 100644 --- a/facetracknoir/main.cpp +++ b/facetracknoir/main.cpp @@ -1,11 +1,33 @@ #include "facetracknoir.h" #include +#include +#include #include int main(int argc, char** argv) { + // workaround QTBUG-38598 + QCoreApplication::addLibraryPath("."); + + // qt5 designer-made controls look like shit on 'doze -sh 20140921 +#ifdef _WIN32 + { + const QStringList preferred { "fusion", "windowsvista", "jazzbands'-marijuana", "macintosh", "windowsxp" }; + for (const auto& style_name : preferred) + { + QStyle* s = QStyleFactory::create(style_name); + if (s) + { + QApplication::setStyle(s); + break; + } + } + } +#endif + QApplication::setAttribute(Qt::AA_X11InitThreads, true); QApplication app(argc, argv); + auto w = std::make_shared(); w->show(); -- cgit v1.2.3