summaryrefslogtreecommitdiffhomepage
path: root/opentrack/shortcuts.cpp
diff options
context:
space:
mode:
authorStanislaw Halik <sthalik@misaki.pl>2015-11-22 15:07:23 +0100
committerStanislaw Halik <sthalik@misaki.pl>2015-11-22 15:55:40 +0100
commitbf5931532f91107747cc45befffb5cc189777c89 (patch)
treea1c5d99a971e04ad5a9e89f158941fcb711c7ff2 /opentrack/shortcuts.cpp
parenta9860e951757bf454b83b13ce7eff865f0b6644e (diff)
work: use the centralized keypress worker
Diffstat (limited to 'opentrack/shortcuts.cpp')
-rw-r--r--opentrack/shortcuts.cpp10
1 files changed, 1 insertions, 9 deletions
diff --git a/opentrack/shortcuts.cpp b/opentrack/shortcuts.cpp
index 059febdb..b961294f 100644
--- a/opentrack/shortcuts.cpp
+++ b/opentrack/shortcuts.cpp
@@ -61,7 +61,7 @@ void Shortcuts::bind_keyboard_shortcut(K &key, key_opts& k)
#endif
#ifdef _WIN32
-void Shortcuts::receiver(Key &k)
+void Shortcuts::receiver(const Key& k)
{
std::vector<K*> ks { &keyCenter, &keyToggle, &keyZero };
for (K* k_ : ks)
@@ -92,12 +92,4 @@ void Shortcuts::reload() {
bind_keyboard_shortcut(keyCenter, s.center);
bind_keyboard_shortcut(keyToggle, s.toggle);
bind_keyboard_shortcut(keyZero, s.zero);
-#ifdef _WIN32
- bool is_new = keybindingWorker == nullptr;
- if (is_new)
- {
- keybindingWorker = std::make_shared<KeybindingWorker>([&](Key& k) { receiver(k); }, handle);
- keybindingWorker->start();
- }
-#endif
}