mupen64plus / mupen64plus-user-issues

Issue reports from users go here
http://www.mupen64plus.org/
17 stars 3 forks source link

Allow background events #666

Closed robalni closed 8 years ago

robalni commented 8 years ago

The emulator window needs to be focused, otherwise button inputs don't work (but axes do). I would like to be able to play while having the window in the background. It is possible to fix this by adding this line of code:

SDL_SetHint(SDL_HINT_JOYSTICK_ALLOW_BACKGROUND_EVENTS, "1");

somewhere after SDL_Init(). If you don't want this to be default, it would be nice to have it as an option.

richard42 commented 8 years ago

Okay, I just pushed a commit for this. I found that this "SetHint" had to be called before the SDL_Init of the video subsystem, so I put this in the video extension function VidExt_Init. As a result, it might not work for front-end applications which use their own video extension code for ie Qt window integration.