mirror of https://github.com/mgba-emu/mgba.git
SDL: Fix joystick when no window is open
This commit is contained in:
parent
e797d009d0
commit
f2eae7ce33
|
@ -33,6 +33,8 @@ bool GBASDLInitEvents(struct GBASDLEvents* context) {
|
|||
int subsystem = SDL_INIT_JOYSTICK;
|
||||
#if SDL_VERSION_ATLEAST(2, 0, 0)
|
||||
subsystem |= SDL_INIT_HAPTIC | SDL_INIT_VIDEO;
|
||||
|
||||
SDL_SetHint(SDL_HINT_JOYSTICK_ALLOW_BACKGROUND_EVENTS, "1");
|
||||
#endif
|
||||
if (SDL_InitSubSystem(subsystem) < 0) {
|
||||
return false;
|
||||
|
|
Loading…
Reference in New Issue