From 0427cea6463fe4f8bb549c128c65ca2b508e53ed Mon Sep 17 00:00:00 2001 From: Mark Vejvoda Date: Fri, 6 Jan 2012 07:15:04 +0000 Subject: [PATCH] - only init sdl keyboard items in interactive game mode --- source/shared_lib/include/platform/sdl/platform_main.h | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/source/shared_lib/include/platform/sdl/platform_main.h b/source/shared_lib/include/platform/sdl/platform_main.h index 587281f6..37586caf 100644 --- a/source/shared_lib/include/platform/sdl/platform_main.h +++ b/source/shared_lib/include/platform/sdl/platform_main.h @@ -403,7 +403,8 @@ int mainSetup(int argc, char **argv) { hasCommandArgument(argc, argv,string(GAME_ARGS[GAME_ARG_VERSION])) == true || hasCommandArgument(argc, argv,string(GAME_ARGS[GAME_ARG_SHOW_INI_SETTINGS])) == true || hasCommandArgument(argc, argv,string(GAME_ARGS[GAME_ARG_MASTERSERVER_MODE])) == true) { - if(SDL_Init(SDL_INIT_TIMER | SDL_INIT_JOYSTICK) < 0) { + // Use this for masterserver mode for timers like Chrono + if(SDL_Init(SDL_INIT_TIMER) < 0) { std::cerr << "Couldn't initialize SDL: " << SDL_GetError() << "\n"; return 1; } @@ -413,9 +414,9 @@ int mainSetup(int argc, char **argv) { std::cerr << "Couldn't initialize SDL: " << SDL_GetError() << "\n"; return 1; } + SDL_EnableUNICODE(1); + SDL_EnableKeyRepeat(SDL_DEFAULT_REPEAT_DELAY, SDL_DEFAULT_REPEAT_INTERVAL); } - SDL_EnableUNICODE(1); - SDL_EnableKeyRepeat(SDL_DEFAULT_REPEAT_DELAY, SDL_DEFAULT_REPEAT_INTERVAL); return 0; }