X-Git-Url: http://deadsoftware.ru/gitweb?a=blobdiff_plain;f=src%2Fgame%2Fsdl2%2Fg_touch.pas;h=c6a9e232048d3e5b670ad063c7f92a4753e990a9;hb=5c816a8e702fd39c65d0928a3315d81e979f30fb;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..c6a9e23 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_main, 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