diff options
Diffstat (limited to 'pugl/pugl_win.c')
-rw-r--r-- | pugl/pugl_win.c | 12 |
1 files changed, 5 insertions, 7 deletions
diff --git a/pugl/pugl_win.c b/pugl/pugl_win.c index b5afe90..af32210 100644 --- a/pugl/pugl_win.c +++ b/pugl/pugl_win.c @@ -434,13 +434,11 @@ keySymToSpecial(WPARAM sym) static uint32_t getModifiers(void) { - uint32_t mods = 0; - mods |= (GetKeyState(VK_SHIFT) < 0) ? PUGL_MOD_SHIFT : 0; - mods |= (GetKeyState(VK_CONTROL) < 0) ? PUGL_MOD_CTRL : 0; - mods |= (GetKeyState(VK_MENU) < 0) ? PUGL_MOD_ALT : 0; - mods |= (GetKeyState(VK_LWIN) < 0) ? PUGL_MOD_SUPER : 0; - mods |= (GetKeyState(VK_RWIN) < 0) ? PUGL_MOD_SUPER : 0; - return mods; + return (((GetKeyState(VK_SHIFT) < 0) ? PUGL_MOD_SHIFT : 0u) | + ((GetKeyState(VK_CONTROL) < 0) ? PUGL_MOD_CTRL : 0u) | + ((GetKeyState(VK_MENU) < 0) ? PUGL_MOD_ALT : 0u) | + ((GetKeyState(VK_LWIN) < 0) ? PUGL_MOD_SUPER : 0u) | + ((GetKeyState(VK_RWIN) < 0) ? PUGL_MOD_SUPER : 0u)); } static void |