Skip to content

Commit

Permalink
Merge pull request dolphin-emu#2777 from Armada651/hotkey-down
Browse files Browse the repository at this point in the history
HotkeyManager: Activate hotkey when key is pressed.
  • Loading branch information
CrossVR committed Jul 25, 2015
2 parents 75fc213 + 3814b5b commit 4d5f693
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions Source/Core/Core/HotkeyManager.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -159,16 +159,14 @@ bool IsPressed(int Id, bool held)
unsigned int setKey = Id % 32;
if (s_hotkey.button[set] & (1 << setKey))
{
bool pressed = !!(s_hotkeyDown[set] & (1 << setKey));
s_hotkeyDown[set] |= (1 << setKey);
if (held)
if (!pressed || held)
return true;
}
else
{
bool pressed = !!(s_hotkeyDown[set] & (1 << setKey));
s_hotkeyDown[set] &= ~(1 << setKey);
if (pressed)
return true;
}

return false;
Expand Down

0 comments on commit 4d5f693

Please sign in to comment.