DEADSOFTWARE

added some "key unpress" calls; maybe it will fix intermissions (i don't know, it...
[d2df-sdl.git] / src / game / g_main.pas
index 07d2f48007b52a75ccd1c7b3befae8dac45b1708..b564911086e54da4c1b0ad284666578146efd1e2 100644 (file)
@@ -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)