mirror of
https://github.com/melonDS-emu/melonDS.git
synced 2025-06-28 09:59:41 -06:00
fix touchscreen code in non-hybrid layout mode, fixes #1087
(also what the fuck is that code)
This commit is contained in:
@ -473,14 +473,13 @@ bool GetTouchCoords(int& x, int& y)
|
|||||||
|
|
||||||
M23_Transform(TouchMtx, vx, vy);
|
M23_Transform(TouchMtx, vx, vy);
|
||||||
|
|
||||||
|
x = (int)vx;
|
||||||
|
y = (int)vy;
|
||||||
|
|
||||||
if (vx >= 0 && vx < 256 && vy >= 0 && vy < 192)
|
if (vx >= 0 && vx < 256 && vy >= 0 && vy < 192)
|
||||||
{
|
|
||||||
x = (int)vx;
|
|
||||||
y = (int)vy;
|
|
||||||
return true;
|
return true;
|
||||||
}
|
|
||||||
}
|
}
|
||||||
if (HybEnable && HybScreen == 1)
|
else if (HybEnable && HybScreen == 1)
|
||||||
{
|
{
|
||||||
float vx = x;
|
float vx = x;
|
||||||
float vy = y;
|
float vy = y;
|
||||||
@ -493,6 +492,7 @@ bool GetTouchCoords(int& x, int& y)
|
|||||||
if (x >= 0 && x < 256 && y >= 0 && y < 192)
|
if (x >= 0 && x < 256 && y >= 0 && y < 192)
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user