From 03bfbd2be7eedf046a83f6d96e874955c6e66b88 Mon Sep 17 00:00:00 2001 From: Arisotura Date: Sat, 1 May 2021 19:09:01 +0200 Subject: fix touchscreen code in non-hybrid layout mode, fixes #1087 (also what the fuck is that code) --- src/frontend/Util_Video.cpp | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'src/frontend') diff --git a/src/frontend/Util_Video.cpp b/src/frontend/Util_Video.cpp index 3730c3e..94c699c 100644 --- a/src/frontend/Util_Video.cpp +++ b/src/frontend/Util_Video.cpp @@ -473,14 +473,13 @@ bool GetTouchCoords(int& x, int& y) M23_Transform(TouchMtx, vx, vy); + x = (int)vx; + y = (int)vy; + if (vx >= 0 && vx < 256 && vy >= 0 && vy < 192) - { - x = (int)vx; - y = (int)vy; return true; - } } - if (HybEnable && HybScreen == 1) + else if (HybEnable && HybScreen == 1) { float vx = x; float vy = y; @@ -493,6 +492,7 @@ bool GetTouchCoords(int& x, int& y) if (x >= 0 && x < 256 && y >= 0 && y < 192) return true; } + return false; } -- cgit v1.2.3