From dd79cbba8da99d16b9c8ecb7fd861e6b98080743 Mon Sep 17 00:00:00 2001 From: Stanislaw Halik Date: Sun, 15 May 2016 12:57:25 +0200 Subject: api/shortcuts: unbreak "while held" keys on win32 --- opentrack/shortcuts.cpp | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) (limited to 'opentrack') 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> &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]; -- cgit v1.2.3