X-Git-Url: http://deadsoftware.ru/gitweb?a=blobdiff_plain;f=src%2Fgame%2Fg_main.pas;h=b564911086e54da4c1b0ad284666578146efd1e2;hb=67c6f2778c699f242412be03e2b874d14a7d10c9;hp=93655f66f8a7fe939e1338b31b9d517b2ca632da;hpb=1b5401f0727c171cf02d4484624bb3198f7a10bd;p=d2df-sdl.git diff --git a/src/game/g_main.pas b/src/game/g_main.pas index 93655f6..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) @@ -491,12 +495,12 @@ begin if (g_ActiveWindow = nil) then g_Game_Pause(not gPause); end; - IK_BACKQUOTE: // <`/~/¨/¸>: + IK_BACKQUOTE, VK_CONSOLE: // <`/~/¨/¸>: begin g_Console_Switch(); end; - IK_ESCAPE: // : + IK_ESCAPE, VK_ESCAPE: // : begin if gChatShow then begin