Touch control layout: Make sure no buttons are initialized off screen.

Fixes #19486
This commit is contained in:
Henrik Rydgård committed 2024-09-26 11:08:07 +02:00
1 parent 027385d218
commit 758776f216
1 file changed
+1 -1
+1 -1
View File
@@ -731,7 +731,7 @@ void InitPadLayout(float xres, float yres, float globalScale) {
auto initTouchPos = [=](ConfigTouchPos &touch, float x, float y) {
if (touch.x == -1.0f || touch.y == -1.0f) {
touch.x = x / xres;
touch.y = y / yres;
touch.y = std::max(y, 20.0f * globalScale) / yres;
touch.scale = scale;
}
};