diff options
| author | Andre Weissflog <floooh@gmail.com> | 2020-01-13 12:28:09 +0100 |
|---|---|---|
| committer | Andre Weissflog <floooh@gmail.com> | 2020-01-13 12:28:09 +0100 |
| commit | 771bffd92be340212806fedf6c7a850889864a6e (patch) | |
| tree | 8e5e8a84b3f9071ee5de3bbba12d79c12506e041 | |
| parent | 1e0de43e94fb2799894efc3ff4b09cd35c1cda8c (diff) | |
sokol_app.h win32: fix MSB check for GetKeyState() return value (fixes #247)
| -rw-r--r-- | sokol_app.h | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/sokol_app.h b/sokol_app.h index 6743c739..abb5d248 100644 --- a/sokol_app.h +++ b/sokol_app.h @@ -4259,16 +4259,16 @@ _SOKOL_PRIVATE bool _sapp_win32_update_dimensions(void) { _SOKOL_PRIVATE uint32_t _sapp_win32_mods(void) { uint32_t mods = 0; - if (GetKeyState(VK_SHIFT) & (1<<31)) { + if (GetKeyState(VK_SHIFT) & (1<<15)) { mods |= SAPP_MODIFIER_SHIFT; } - if (GetKeyState(VK_CONTROL) & (1<<31)) { + if (GetKeyState(VK_CONTROL) & (1<<15)) { mods |= SAPP_MODIFIER_CTRL; } - if (GetKeyState(VK_MENU) & (1<<31)) { + if (GetKeyState(VK_MENU) & (1<<15)) { mods |= SAPP_MODIFIER_ALT; } - if ((GetKeyState(VK_LWIN) | GetKeyState(VK_RWIN)) & (1<<31)) { + if ((GetKeyState(VK_LWIN) | GetKeyState(VK_RWIN)) & (1<<15)) { mods |= SAPP_MODIFIER_SUPER; } return mods; |