diff options
Diffstat (limited to 'opentrack/shortcuts.h')
-rw-r--r-- | opentrack/shortcuts.h | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/opentrack/shortcuts.h b/opentrack/shortcuts.h index 2d7fec54..8877b5bb 100644 --- a/opentrack/shortcuts.h +++ b/opentrack/shortcuts.h @@ -67,19 +67,15 @@ struct Shortcuts; struct KeybindingWorker : public QThread { #ifdef _WIN32 private: - Shortcuts& sc; LPDIRECTINPUT8 din; LPDIRECTINPUTDEVICE8 dinkeyboard; - Key kCenter; - Key kToggle; - Key kZero; QMutex mtx; public: volatile bool should_quit; + std::function<void(Key&)> receiver; ~KeybindingWorker(); - KeybindingWorker(Key keyCenter, Key keyToggle, Key keyZero, WId handle, Shortcuts& sc); + KeybindingWorker(std::function<void(Key&)> receiver, WId h); void run(); - void set_keys(Key kCenter, Key kToggle, Key kZero); #else public: KeybindingWorker(Key, Key, Key, WId) {} @@ -124,6 +120,9 @@ public: void reload(); private: void bind_keyboard_shortcut(K &key, key_opts& k); +#ifdef _WIN32 + void receiver(Key& k); +#endif signals: void center(); void toggle(); |