mirror of
https://github.com/melonDS-emu/melonDS.git
synced 2025-07-21 05:09:46 -06:00
Input: only check joystick input if a joystick actually exists
This commit is contained in:
@ -209,16 +209,22 @@ void Process()
|
|||||||
}
|
}
|
||||||
|
|
||||||
JoyInputMask = 0xFFF;
|
JoyInputMask = 0xFFF;
|
||||||
for (int i = 0; i < 12; i++)
|
if (Joystick)
|
||||||
if (JoystickButtonDown(Config::JoyMapping[i]))
|
{
|
||||||
JoyInputMask &= ~(1<<i);
|
for (int i = 0; i < 12; i++)
|
||||||
|
if (JoystickButtonDown(Config::JoyMapping[i]))
|
||||||
|
JoyInputMask &= ~(1 << i);
|
||||||
|
}
|
||||||
|
|
||||||
InputMask = KeyInputMask & JoyInputMask;
|
InputMask = KeyInputMask & JoyInputMask;
|
||||||
|
|
||||||
JoyHotkeyMask = 0;
|
JoyHotkeyMask = 0;
|
||||||
for (int i = 0; i < HK_MAX; i++)
|
if (Joystick)
|
||||||
if (JoystickButtonDown(Config::HKJoyMapping[i]))
|
{
|
||||||
JoyHotkeyMask |= (1<<i);
|
for (int i = 0; i < HK_MAX; i++)
|
||||||
|
if (JoystickButtonDown(Config::HKJoyMapping[i]))
|
||||||
|
JoyHotkeyMask |= (1 << i);
|
||||||
|
}
|
||||||
|
|
||||||
HotkeyMask = KeyHotkeyMask | JoyHotkeyMask;
|
HotkeyMask = KeyHotkeyMask | JoyHotkeyMask;
|
||||||
HotkeyPress = HotkeyMask & ~LastHotkeyMask;
|
HotkeyPress = HotkeyMask & ~LastHotkeyMask;
|
||||||
|
Reference in New Issue
Block a user