X-Git-Url: https://deadsoftware.ru/gitweb?a=blobdiff_plain;f=src%2Fgame%2Fsdl2%2Fg_touch.pas;h=629ca3a69fde4a62f866d0bcf140f2ba131f3190;hb=c8d05082e92b7c2c5b722e2b205e96a15a32eec2;hp=23cfbc1fc3ca8920b518d9e0af0494ae7de90ab7;hpb=1aabd118ca7663db8646c6ee9ac07b35fc3fb51b;p=d2df-sdl.git diff --git a/src/game/sdl2/g_touch.pas b/src/game/sdl2/g_touch.pas index 23cfbc1..629ca3a 100644 --- a/src/game/sdl2/g_touch.pas +++ b/src/game/sdl2/g_touch.pas @@ -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; 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