mirror of
https://github.com/glfw/glfw.git
synced 2024-11-25 22:14:34 +00:00
Win32: Fix accidentally working bit tests
Good grief.
This commit is contained in:
parent
30489c5aa1
commit
7c87948eaf
@ -384,13 +384,13 @@ static int getKeyMods(void)
|
|||||||
{
|
{
|
||||||
int mods = 0;
|
int mods = 0;
|
||||||
|
|
||||||
if (GetKeyState(VK_SHIFT) & (1 << 31))
|
if (GetKeyState(VK_SHIFT) & 0x8000)
|
||||||
mods |= GLFW_MOD_SHIFT;
|
mods |= GLFW_MOD_SHIFT;
|
||||||
if (GetKeyState(VK_CONTROL) & (1 << 31))
|
if (GetKeyState(VK_CONTROL) & 0x8000)
|
||||||
mods |= GLFW_MOD_CONTROL;
|
mods |= GLFW_MOD_CONTROL;
|
||||||
if (GetKeyState(VK_MENU) & (1 << 31))
|
if (GetKeyState(VK_MENU) & 0x8000)
|
||||||
mods |= GLFW_MOD_ALT;
|
mods |= GLFW_MOD_ALT;
|
||||||
if ((GetKeyState(VK_LWIN) | GetKeyState(VK_RWIN)) & (1 << 31))
|
if ((GetKeyState(VK_LWIN) | GetKeyState(VK_RWIN)) & 0x8000)
|
||||||
mods |= GLFW_MOD_SUPER;
|
mods |= GLFW_MOD_SUPER;
|
||||||
|
|
||||||
return mods;
|
return mods;
|
||||||
@ -402,13 +402,13 @@ static int getAsyncKeyMods(void)
|
|||||||
{
|
{
|
||||||
int mods = 0;
|
int mods = 0;
|
||||||
|
|
||||||
if (GetAsyncKeyState(VK_SHIFT) & (1 << 31))
|
if (GetAsyncKeyState(VK_SHIFT) & 0x8000)
|
||||||
mods |= GLFW_MOD_SHIFT;
|
mods |= GLFW_MOD_SHIFT;
|
||||||
if (GetAsyncKeyState(VK_CONTROL) & (1 << 31))
|
if (GetAsyncKeyState(VK_CONTROL) & 0x8000)
|
||||||
mods |= GLFW_MOD_CONTROL;
|
mods |= GLFW_MOD_CONTROL;
|
||||||
if (GetAsyncKeyState(VK_MENU) & (1 << 31))
|
if (GetAsyncKeyState(VK_MENU) & 0x8000)
|
||||||
mods |= GLFW_MOD_ALT;
|
mods |= GLFW_MOD_ALT;
|
||||||
if ((GetAsyncKeyState(VK_LWIN) | GetAsyncKeyState(VK_RWIN)) & (1 << 31))
|
if ((GetAsyncKeyState(VK_LWIN) | GetAsyncKeyState(VK_RWIN)) & 0x8000)
|
||||||
mods |= GLFW_MOD_SUPER;
|
mods |= GLFW_MOD_SUPER;
|
||||||
|
|
||||||
return mods;
|
return mods;
|
||||||
|
Loading…
Reference in New Issue
Block a user