diff options
-rw-r--r-- | facetracknoir/facetracknoir.cpp | 10 | ||||
-rw-r--r-- | facetracknoir/shortcuts.cpp | 2 |
2 files changed, 7 insertions, 5 deletions
diff --git a/facetracknoir/facetracknoir.cpp b/facetracknoir/facetracknoir.cpp index af630bea..f5358329 100644 --- a/facetracknoir/facetracknoir.cpp +++ b/facetracknoir/facetracknoir.cpp @@ -183,8 +183,10 @@ FaceTrackNoIR::FaceTrackNoIR(QWidget *parent, Qt::WindowFlags flags) : ui.lcdNumOutputRotY->setVisible(false); ui.lcdNumOutputRotZ->setVisible(false); +#ifndef _WIN32 connect(&keyCenter, SIGNAL(activated()), this, SLOT(shortcutRecentered())); connect(&keyToggle, SIGNAL(activated()), this, SLOT(shortcutToggled())); +#endif } /** destructor stops the engine and quits the faceapi **/ @@ -548,7 +550,7 @@ void FaceTrackNoIR::startTracker( ) { } #if defined(_WIN32) - keybindingWorker = new KeybindingWorker(*this, &keyCenter, &keyToggle); + keybindingWorker = new KeybindingWorker(*this, keyCenter, keyToggle); keybindingWorker->start(); #endif @@ -939,7 +941,7 @@ void FaceTrackNoIR::bind_keyboard_shortcut(QxtGlobalShortcut& key, const QString } } #else -static void bind_keyboard_shotcut(Key& key, const QString label, QSettings& iniFile) +static void bind_keyboard_shortcut(Key& key, const QString label, QSettings& iniFile) { const int idx = iniFile.value("Key_index_" + label, 0).toInt(); if (idx > 0) @@ -967,8 +969,8 @@ void FaceTrackNoIR::bindKeyboardShortcuts() bind_keyboard_shortcut(keyCenter, "Center", iniFile); bind_keyboard_shortcut(keyToggle, "Toggle", iniFile); #else - bind_keyboard_shortcut(&keyCenter, "Center", iniFile)); - bind_keyboard_shortcut(&keyToggle, "Toggle", iniFile)); + bind_keyboard_shortcut(keyCenter, "Center", iniFile); + bind_keyboard_shortcut(keyToggle, "Toggle", iniFile); #endif iniFile.endGroup (); diff --git a/facetracknoir/shortcuts.cpp b/facetracknoir/shortcuts.cpp index 1cd967e0..09663a0f 100644 --- a/facetracknoir/shortcuts.cpp +++ b/facetracknoir/shortcuts.cpp @@ -197,7 +197,7 @@ KeybindingWorkerImpl::~KeybindingWorkerImpl() { } KeybindingWorkerImpl::KeybindingWorkerImpl(FaceTrackNoIR& w, Key keyCenter, Key keyToggle) -: din(0), dinkeyboard(0), kCenter(keyCenter), ktoggle(keyTogle), window(w), should_quit(true) +: din(0), dinkeyboard(0), kCenter(keyCenter), kToggle(keyToggle), window(w), should_quit(true) { if (DirectInput8Create(GetModuleHandle(NULL), DIRECTINPUT_VERSION, IID_IDirectInput8, (void**)&din, NULL) != DI_OK) { qDebug() << "setup DirectInput8 Creation failed!" << GetLastError(); |