fix touchscreen code in non-hybrid layout mode, fixes #1087

(also what the fuck is that code)
This commit is contained in:
Arisotura 2021-05-01 19:09:01 +02:00
parent 33a1bd3ac3
commit 03bfbd2be7
1 changed files with 5 additions and 5 deletions

View File

@ -473,14 +473,13 @@ bool GetTouchCoords(int& x, int& y)
M23_Transform(TouchMtx, vx, vy);
if (vx >= 0 && vx < 256 && vy >= 0 && vy < 192)
{
x = (int)vx;
y = (int)vy;
if (vx >= 0 && vx < 256 && vy >= 0 && vy < 192)
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;
}