SDL: Fix joystick when no window is open
Jeffrey Pfau jeffrey@endrift.com
Mon, 18 May 2015 22:16:06 -0700
1 files changed,
2 insertions(+),
0 deletions(-)
jump to
M
src/platform/sdl/sdl-events.c
→
src/platform/sdl/sdl-events.c
@@ -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;