mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-01-24 06:51:17 +01:00
Merge pull request #2777 from Armada651/hotkey-down
HotkeyManager: Activate hotkey when key is pressed.
This commit is contained in:
commit
4d5f693d88
@ -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;
|
||||
|
Loading…
x
Reference in New Issue
Block a user