diff options
author | Stanislaw Halik <sthalik@misaki.pl> | 2015-07-08 05:55:32 +0200 |
---|---|---|
committer | Stanislaw Halik <sthalik@misaki.pl> | 2015-07-08 05:55:59 +0200 |
commit | 527eef2a2f0e68b286e1b782ba148ecdfafbb89c (patch) | |
tree | 2be0f0b96df712f7b12534291db3c36564be62ca /facetracknoir/main.cpp | |
parent | 3a54a111567370ecf903704d702d12736b693a8e (diff) | |
parent | ab47eac174db02710a7fa6c194e00c31cef755a4 (diff) |
Merge branch 'unstable' into trackhat-ui
Diffstat (limited to 'facetracknoir/main.cpp')
-rw-r--r-- | facetracknoir/main.cpp | 26 |
1 files changed, 3 insertions, 23 deletions
diff --git a/facetracknoir/main.cpp b/facetracknoir/main.cpp index 6d29e3b5..326b40ec 100644 --- a/facetracknoir/main.cpp +++ b/facetracknoir/main.cpp @@ -60,34 +60,14 @@ int main(int argc, char** argv) QApplication::setAttribute(Qt::AA_X11InitThreads, true); QApplication app(argc, argv); - QCommandLineParser p; - p.setApplicationDescription("opentrack - Head tracking software for MS Windows, Linux, and Apple OSX"); - p.addHelpOption(); - QCommandLineOption autostartOption(QStringList() << "a" << "autostart", "Load <profile> and start tracking", "profile"); - p.addOption(autostartOption); - p.process(app); - - QString profile = p.value(autostartOption); - - bool use_profile = profile.endsWith(".ini") && QFileInfo(profile).exists() && QFileInfo(profile).isFile(); - if (!profile.isEmpty() && !use_profile) - QMessageBox::warning(nullptr, "Can't load profile", "Profile " + profile + " specified but can't be opened!", - QMessageBox::Ok, QMessageBox::NoButton); - - if (use_profile) - MainWindow::set_profile(profile); - auto w = std::make_shared<MainWindow>(); - - if (use_profile) - w->startTracker(); - + w->show(); app.exec(); - // on MSVC crashes in atexit + // on MSVC crashes in atexit #ifdef _MSC_VER - TerminateProcess(GetCurrentProcess(), 0); + TerminateProcess(GetCurrentProcess(), 0); #endif return 0; } |