Fixed joystick support. Video is required for joystick events to work!!

This commit is contained in:
evilynux 2007-04-21 14:27:07 +00:00
parent bdc40f94de
commit b4bd8c6dbf
1 changed files with 3 additions and 2 deletions

View File

@ -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());