Skip to content

Commit dfe1c4f

Browse files
committed
Allow gamepads to be used in the background (Fixes #11)
1 parent f514ab5 commit dfe1c4f

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

src/main.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -382,6 +382,8 @@ int main(int argc, char** argv) {
382382
if (g_config.audio_samples <= 0 || ((g_config.audio_samples & (g_config.audio_samples - 1)) != 0))
383383
g_config.audio_samples = kDefaultSamples;
384384

385+
SDL_SetHint(SDL_HINT_JOYSTICK_ALLOW_BACKGROUND_EVENTS, "1");
386+
385387
// set up SDL
386388
if(SDL_Init(SDL_INIT_VIDEO | SDL_INIT_AUDIO | SDL_INIT_GAMECONTROLLER) != 0) {
387389
printf("Failed to init SDL: %s\n", SDL_GetError());

0 commit comments

Comments
 (0)