From 6a03c7ff09f328e36842cfb5194baa1a380afd7c Mon Sep 17 00:00:00 2001 From: zeromus Date: Sat, 18 Apr 2009 21:25:41 +0000 Subject: [PATCH] [2750702] fixed: shift key is sticky in hotkeys, making you save sometimes when you meant to load --- desmume/src/windows/main.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/desmume/src/windows/main.cpp b/desmume/src/windows/main.cpp index e38288da1..ce9a81d07 100644 --- a/desmume/src/windows/main.cpp +++ b/desmume/src/windows/main.cpp @@ -2129,9 +2129,9 @@ int GetModifiers(int key) if (key == VK_MENU || key == VK_CONTROL || key == VK_SHIFT) return 0; - if(GetAsyncKeyState(VK_MENU )) modifiers |= CUSTKEY_ALT_MASK; - if(GetAsyncKeyState(VK_CONTROL)) modifiers |= CUSTKEY_CTRL_MASK; - if(GetAsyncKeyState(VK_SHIFT )) modifiers |= CUSTKEY_SHIFT_MASK; + if(GetAsyncKeyState(VK_MENU )&0x8000) modifiers |= CUSTKEY_ALT_MASK; + if(GetAsyncKeyState(VK_CONTROL)&0x8000) modifiers |= CUSTKEY_CTRL_MASK; + if(GetAsyncKeyState(VK_SHIFT )&0x8000) modifiers |= CUSTKEY_SHIFT_MASK; return modifiers; }