diff options
author | Stanislaw Halik <sthalik@misaki.pl> | 2015-11-12 08:48:51 +0100 |
---|---|---|
committer | Stanislaw Halik <sthalik@misaki.pl> | 2015-11-12 08:48:51 +0100 |
commit | 798f6e9076855bf7769aba8abde4d570960d0755 (patch) | |
tree | 064bb8ec1f34a049bf852cf10a78700d37f21e78 /opentrack/win32-joystick-shortcuts.hpp | |
parent | afc6da0a17eec9e1da31a79c610a8f090507b39e (diff) |
joy: remove branching
Diffstat (limited to 'opentrack/win32-joystick-shortcuts.hpp')
-rw-r--r-- | opentrack/win32-joystick-shortcuts.hpp | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/opentrack/win32-joystick-shortcuts.hpp b/opentrack/win32-joystick-shortcuts.hpp index f3bca827..e54596bd 100644 --- a/opentrack/win32-joystick-shortcuts.hpp +++ b/opentrack/win32-joystick-shortcuts.hpp @@ -67,9 +67,6 @@ struct win32_joy_ctx { HRESULT hr; bool ok = false; - - if (first_timer.elapsed_ms() > first_event_delay_ms) - first = true; for (int i = 0; i < 5; i++) { @@ -99,6 +96,8 @@ struct win32_joy_ctx qDebug() << "joy get state failed" << guid << hr; return false; } + + first |= first_timer.elapsed_ms() > first_event_delay_ms; for (int i = 0; i < 128; i++) { |