X-Git-Url: http://deadsoftware.ru/gitweb?a=blobdiff_plain;f=src%2Fgame%2Fg_main.pas;h=b564911086e54da4c1b0ad284666578146efd1e2;hb=67c6f2778c699f242412be03e2b874d14a7d10c9;hp=07d2f48007b52a75ccd1c7b3befae8dac45b1708;hpb=54b1109da7cd0eb8498980a6ad57f2dcda49b022;p=d2df-sdl.git diff --git a/src/game/g_main.pas b/src/game/g_main.pas index 07d2f48..b564911 100644 --- a/src/game/g_main.pas +++ b/src/game/g_main.pas @@ -46,7 +46,7 @@ uses e_graphics, e_input, g_game, g_console, g_gui, e_sound, g_options, g_sound, g_player, g_basic, g_weapons, SysUtils, g_triggers, MAPDEF, g_map, - g_menu, g_language, g_net, g_holmes, + g_menu, g_language, g_net, g_holmes, g_touch, utils, conbuf, envvars, fui_wadread, fui_style, fui_gfx_gl, xparser; @@ -112,6 +112,9 @@ begin sdlflags := SDL_INIT_JOYSTICK or SDL_INIT_TIMER or SDL_INIT_VIDEO; {$ENDIF} {$ENDIF} + + SDL_SetHint(SDL_HINT_ACCELEROMETER_AS_JOYSTICK, '0'); + if SDL_Init(sdlflags) < 0 then raise Exception.Create('SDL: Init failed: ' + SDL_GetError()); @@ -198,6 +201,7 @@ begin e_WriteLog('Init Input', TMsgType.Notify); e_InitInput(); + g_Touch_Init; if (e_JoysticksAvailable > 0) then e_WriteLog('Input: Joysticks available.', TMsgType.Notify)