summaryrefslogtreecommitdiffhomepage
path: root/opentrack
diff options
context:
space:
mode:
authorStanislaw Halik <sthalik@misaki.pl>2014-10-24 05:16:24 +0200
committerStanislaw Halik <sthalik@misaki.pl>2014-10-24 07:02:01 +0200
commitff8e80816a8e0a67644c0cb62bbfa01a5eb94246 (patch)
tree5c66a7ccd42909a965479ca4e283e2103a5d9e71 /opentrack
parent1379b8c5058f7a82c9c4747c06bc742cde87a69a (diff)
always initialize keycode et al on win32
Diffstat (limited to 'opentrack')
-rw-r--r--opentrack/shortcuts.cpp17
1 files changed, 7 insertions, 10 deletions
diff --git a/opentrack/shortcuts.cpp b/opentrack/shortcuts.cpp
index 77c57237..6ccefef9 100644
--- a/opentrack/shortcuts.cpp
+++ b/opentrack/shortcuts.cpp
@@ -157,16 +157,13 @@ void Shortcuts::bind_keyboard_shortcut(K &key, key_opts& k)
}
#else
int idx = k.key_index;
- if (idx > 0)
- {
- key.keycode = 0;
- key.shift = key.alt = key.ctrl = 0;
- if (idx < global_windows_key_sequences.size())
- key.keycode = global_windows_key_sequences[idx];
- key.shift = k.shift;
- key.alt = k.alt;
- key.ctrl = k.ctrl;
- }
+ key.keycode = 0;
+ key.shift = key.alt = key.ctrl = 0;
+ if (idx > 0 && idx < global_windows_key_sequences.size())
+ key.keycode = global_windows_key_sequences[idx];
+ key.shift = k.shift;
+ key.alt = k.alt;
+ key.ctrl = k.ctrl;
#endif
}
void Shortcuts::reload() {