DEADSOFTWARE

cleanup: remove g_main.pas
[d2df-sdl.git] / src / game / sdl2 / g_touch.pas
index 23cfbc1fc3ca8920b518d9e0af0494ae7de90ab7..12a46645989b8d016dd6cc056c3aeab61e4ad935 100644 (file)
@@ -36,7 +36,7 @@ implementation
 
   uses
     SysUtils,
-    e_log, e_graphics, e_input, g_options, g_game, g_main, g_gui, g_weapons, g_console, g_window;
+    e_log, r_graphics, e_input, g_options, g_game, g_gui, g_weapons, g_console, g_window;
 
   var
     angleFire: Boolean;
@@ -65,7 +65,7 @@ implementation
       dpi := 96;
     {$ENDIF}
 
-    sz := Trunc(g_touch_size * dpi); sw := gScreenWidth; sh := gScreenHeight;
+    sz := Trunc(g_touch_size * dpi); sw := gWinSizeX; sh := gWinSizeY;
     x := 0; y := Round(sh * g_touch_offset / 100);
     w := sz; h := sz;
 
@@ -274,8 +274,8 @@ implementation
       Exit;
 
     finger := ev.fingerId + 2;
-    x := Trunc(ev.x * gScreenWidth);
-    y := Trunc(ev.y * gScreenHeight);
+    x := Trunc(ev.x * gWinSizeX);
+    y := Trunc(ev.y * gWinSizeY);
 
     for i := VK_FIRSTKEY to VK_LASTKEY do
     begin