mirror of https://github.com/mgba-emu/mgba.git
SDL: Fix SDL 1.2 build
This commit is contained in:
parent
f2829eef01
commit
9c6b81841e
1
CHANGES
1
CHANGES
|
@ -18,6 +18,7 @@ Bugfixes:
|
|||
- GBA Memory: Fix executing code from OBJ region of VRAM
|
||||
- Util: Fix socket bind addresses
|
||||
- All: Fix instruction tables getting zeroed when linking sometimes
|
||||
- SDL: Fix SDL 1.2 build
|
||||
Misc:
|
||||
- GBA: Slightly optimize GBAProcessEvents
|
||||
- Qt: Add preset for DualShock 4
|
||||
|
|
|
@ -63,10 +63,12 @@ bool GBASDLInitEvents(struct GBASDLEvents* context) {
|
|||
for (i = 0; i < nJoysticks; ++i) {
|
||||
struct SDL_JoystickCombo* joystick = SDL_JoystickListAppend(&context->joysticks);
|
||||
joystick->joystick = SDL_JoystickOpen(i);
|
||||
joystick->id = SDL_JoystickInstanceID(joystick->joystick);
|
||||
joystick->index = SDL_JoystickListSize(&context->joysticks) - 1;
|
||||
#if SDL_VERSION_ATLEAST(2, 0, 0)
|
||||
joystick->id = SDL_JoystickInstanceID(joystick->joystick);
|
||||
joystick->haptic = SDL_HapticOpenFromJoystick(joystick->joystick);
|
||||
#else
|
||||
joystick->id = SDL_JoystickIndex(joystick->joystick);
|
||||
#endif
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue