Skip to content

Commit

Permalink
fix using GetKeyState
Browse files Browse the repository at this point in the history
  • Loading branch information
thantthet committed Jan 25, 2020
1 parent 4be5a56 commit 83f0b27
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions windows/KeyMagic2/KeyMagic2/HotkeyManager.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -60,10 +60,10 @@ void HotkeyManager::OnKeyUp(int key)

void HotkeyManager::ValidateKeyStates()
{
ctrl = GetKeyState(VK_CONTROL) & 80;
alt = GetKeyState(VK_MENU) & 80;
shift = GetKeyState(VK_SHIFT) & 80;
win = GetKeyState(VK_LWIN) & 80;
ctrl = GetKeyState(VK_CONTROL) & 0x8000;
alt = GetKeyState(VK_MENU) & 0x8000;
shift = GetKeyState(VK_SHIFT) & 0x8000;
win = GetKeyState(VK_LWIN) & 0x8000 || GetKeyState(VK_RWIN) & 0x8000;
}

bool HotkeyManager::MatchAndCall()
Expand Down

0 comments on commit 83f0b27

Please sign in to comment.