From d31c12fa4bc85897da328287030cb10a6b0db5af Mon Sep 17 00:00:00 2001 From: Stanislaw Halik Date: Fri, 13 Sep 2013 13:49:46 +0200 Subject: Allow for changing keyboard shortcuts while the tracker is running --- facetracknoir/facetracknoir.cpp | 15 +++++++++++++++ 1 file changed, 15 insertions(+) (limited to 'facetracknoir') diff --git a/facetracknoir/facetracknoir.cpp b/facetracknoir/facetracknoir.cpp index 2bc625cb..8224b35f 100644 --- a/facetracknoir/facetracknoir.cpp +++ b/facetracknoir/facetracknoir.cpp @@ -1278,6 +1278,21 @@ void FaceTrackNoIR::bindKeyboardShortcuts() keyCenter.ctrl = iniFile.value("Ctrl_Center", false).toBool(); #endif iniFile.endGroup (); + + if (tracker) /* running already */ + { +#if defined(_WIN32) || defined(__WIN32) + if (keybindingWorker) + { + keybindingWorker->should_quit = true; + keybindingWorker->wait(); + delete keybindingWorker; + keybindingWorker = NULL; + } + keybindingWorker = new KeybindingWorker(*this, keyCenter); + keybindingWorker->start(); +#endif + } } // -- cgit v1.2.3