From b4bd8c6dbf606e7432c8db18010ba589ba0cd633 Mon Sep 17 00:00:00 2001 From: evilynux Date: Sat, 21 Apr 2007 14:27:07 +0000 Subject: [PATCH] Fixed joystick support. Video is required for joystick events to work!! --- desmume/src/gtk/main.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/desmume/src/gtk/main.c b/desmume/src/gtk/main.c index 3b6c84639..6e547c6fa 100644 --- a/desmume/src/gtk/main.c +++ b/desmume/src/gtk/main.c @@ -1462,8 +1462,9 @@ common_gtk_main( struct configured_features *my_config) { } } #endif - - if(SDL_Init(SDL_INIT_TIMER) == -1) + /* FIXME: SDL_INIT_VIDEO is needed for joystick support to work!? + Perhaps it needs a "window" to catch events...? */ + if(SDL_Init(SDL_INIT_TIMER|SDL_INIT_VIDEO) == -1) { fprintf(stderr, "Error trying to initialize SDL: %s\n", SDL_GetError());