GTK: fix freeze when editing joystick controls

This commit is contained in:
thesource 2021-03-13 12:38:55 +03:00 committed by linkmauve
parent 445579b053
commit 85a2674eb5
1 changed files with 1 additions and 0 deletions

View File

@ -2936,6 +2936,7 @@ common_gtk_main(GApplication *app, gpointer user_data)
/* FIXME: SDL_INIT_VIDEO is needed for joystick support to work!? /* FIXME: SDL_INIT_VIDEO is needed for joystick support to work!?
* Perhaps it needs a "window" to catch events...? */ * Perhaps it needs a "window" to catch events...? */
SDL_SetHint(SDL_HINT_JOYSTICK_ALLOW_BACKGROUND_EVENTS,"1");
if(SDL_Init(SDL_INIT_TIMER|SDL_INIT_VIDEO) == -1) { if(SDL_Init(SDL_INIT_TIMER|SDL_INIT_VIDEO) == -1) {
g_printerr("Error trying to initialize SDL: %s\n", g_printerr("Error trying to initialize SDL: %s\n",
SDL_GetError()); SDL_GetError());