mirror of
https://github.com/melonDS-emu/melonDS.git
synced 2025-07-21 05:09:46 -06:00
might want to update that when hotplugging joysticks, too
This commit is contained in:
@ -436,6 +436,16 @@ int EmuThreadFunc(void* burp)
|
||||
if (!Joystick && (SDL_NumJoysticks() > 0))
|
||||
{
|
||||
Joystick = SDL_JoystickOpen(0);
|
||||
if (Joystick)
|
||||
{
|
||||
njoybuttons = SDL_JoystickNumButtons(Joystick);
|
||||
if (joybuttons) delete[] joybuttons;
|
||||
if (njoybuttons)
|
||||
{
|
||||
joybuttons = new Uint8[njoybuttons];
|
||||
memset(joybuttons, 0, sizeof(Uint8)*njoybuttons);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// poll input
|
||||
|
Reference in New Issue
Block a user