all repos — mgba @ f2eae7ce33a5ff2946cf168b9ee5394b2d5cb0f4

mGBA Game Boy Advance Emulator

SDL: Fix joystick when no window is open
Jeffrey Pfau jeffrey@endrift.com
Mon, 18 May 2015 22:16:06 -0700
commit

f2eae7ce33a5ff2946cf168b9ee5394b2d5cb0f4

parent

e797d009d0da181ba0587927a9da96ef8cf4eef9

1 files changed, 2 insertions(+), 0 deletions(-)

jump to
M src/platform/sdl/sdl-events.csrc/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;