diff options
author | Stanislaw Halik <sthalik@misaki.pl> | 2016-05-15 12:57:25 +0200 |
---|---|---|
committer | Stanislaw Halik <sthalik@misaki.pl> | 2016-05-15 12:57:59 +0200 |
commit | dd79cbba8da99d16b9c8ecb7fd861e6b98080743 (patch) | |
tree | a75eab287b2b7b144430bad7dad4f9542a2d6cfe | |
parent | fc35affa3b72b2a01b6a69f45253bea62f79a9e9 (diff) |
api/shortcuts: unbreak "while held" keys on win32
-rw-r--r-- | opentrack/shortcuts.cpp | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/opentrack/shortcuts.cpp b/opentrack/shortcuts.cpp index 2616bab3..62a6ffd9 100644 --- a/opentrack/shortcuts.cpp +++ b/opentrack/shortcuts.cpp @@ -111,7 +111,15 @@ void Shortcuts::reload(const std::vector<std::tuple<key_opts&, fun, bool>> &keys auto fun = std::get<1>(kk); K k; bind_keyboard_shortcut(k, opts, held); - keys.push_back(tt(k, [=](bool) -> void { fun(true); }, held)); + keys.push_back(tt(k, + [=](unused_on_unix(bool, flag)) -> void { +#ifdef _WIN32 + fun(flag); +#else + fun(true); +#endif + }, + held)); #ifndef _WIN32 const int idx = keys.size() - 1; tt& kk_ = keys[idx]; |