aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorArisotura <thetotalworm@gmail.com>2021-05-01 19:09:01 +0200
committerArisotura <thetotalworm@gmail.com>2021-05-01 19:09:01 +0200
commit03bfbd2be7eedf046a83f6d96e874955c6e66b88 (patch)
tree4e5c7db5ba2b47798506d6874922488ebe19e466 /src
parent33a1bd3ac3954a80f85d8183eed31e67ff7e8eeb (diff)
fix touchscreen code in non-hybrid layout mode, fixes #1087
(also what the fuck is that code)
Diffstat (limited to 'src')
-rw-r--r--src/frontend/Util_Video.cpp10
1 files changed, 5 insertions, 5 deletions
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;
}