DEADSOFTWARE

gl: do not scale vitrual keyboard with r_resoulution scale
authorDeaDDooMER <deaddoomer@deadsoftware.ru>
Tue, 14 Feb 2023 13:44:18 +0000 (16:44 +0300)
committerDeaDDooMER <deaddoomer@deadsoftware.ru>
Fri, 9 Jun 2023 09:13:25 +0000 (12:13 +0300)
src/game/renders/opengl/r_render.pas
src/game/renders/opengl/r_touch.pas

index 95c89678a665edb1451bb329be2f77fde1975c3c..791a29fc55731ac3277c4445e29bea4191a41c2d 100644 (file)
@@ -1260,6 +1260,7 @@ implementation
     {$ENDIF}
 
     {$IFDEF ENABLE_TOUCH}
+      glScalef(1 / r_pixel_scale, 1 / r_pixel_scale, 0);
       r_Touch_Draw;
     {$ENDIF}
 
index 4f0fb8227d6b2b02461a2b616feae10dd1b909dd..2a02aaa9dec6681cc5cc064a20f46a92e7c5be99 100644 (file)
@@ -100,7 +100,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;