diff options
author | Stanislaw Halik <sthalik@misaki.pl> | 2013-09-14 18:33:45 +0200 |
---|---|---|
committer | Stanislaw Halik <sthalik@misaki.pl> | 2013-09-14 18:33:45 +0200 |
commit | 7bb0bdcd09d2dbe2bd0132fc9433a8c0091da18d (patch) | |
tree | 17f681905e952fc1a01318e6273079d7c4d9837b /facetracknoir | |
parent | ba960bad6766cc8315c62b460ed4f2c88274a629 (diff) |
Reduce macro scope
Diffstat (limited to 'facetracknoir')
-rw-r--r-- | facetracknoir/shortcuts.cpp | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/facetracknoir/shortcuts.cpp b/facetracknoir/shortcuts.cpp index c2778806..cf4b81f8 100644 --- a/facetracknoir/shortcuts.cpp +++ b/facetracknoir/shortcuts.cpp @@ -179,10 +179,6 @@ KeybindingWorkerImpl::KeybindingWorkerImpl(FaceTrackNoIR& w, Key keyCenter) should_quit = false; } -#define PROCESS_KEY(k, s) \ - if (isKeyPressed(&k, keystate) && (!k.ever_pressed ? (k.timer.start(), k.ever_pressed = true) : k.timer.restart() > 100)) \ - window.s(); - static bool isKeyPressed( const Key *key, const BYTE *keystate ) { bool shift; bool ctrl; @@ -208,6 +204,10 @@ static bool isKeyPressed( const Key *key, const BYTE *keystate ) { return false; } +#define PROCESS_KEY(k, s) \ + if (isKeyPressed(&k, keystate) && (!k.ever_pressed ? (k.timer.start(), k.ever_pressed = true) : k.timer.restart() > 100)) \ + window.s(); + void KeybindingWorkerImpl::run() { BYTE keystate[256]; while (!should_quit) @@ -223,5 +223,6 @@ void KeybindingWorkerImpl::run() { Sleep(25); } } + #else #endif |