2
1
Fork 0
mirror of https://github.com/yuzu-emu/yuzu.git synced 2024-07-04 23:31:19 +01:00

Merge pull request #10751 from german77/touch

android: Fix touch input
This commit is contained in:
Charles Lombardo 2023-06-13 14:01:02 -04:00 committed by GitHub
commit 0644c9d6cb
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -38,9 +38,11 @@ class FixedRatioSurfaceView @JvmOverloads constructor(
newWidth = width newWidth = width
newHeight = (width / aspectRatio).roundToInt() newHeight = (width / aspectRatio).roundToInt()
} }
setMeasuredDimension(newWidth, newHeight) val left = (width - newWidth) / 2;
val top = (height - newHeight) / 2;
setLeftTopRightBottom(left, top, left + newWidth, top + newHeight)
} else { } else {
setMeasuredDimension(width, height) setLeftTopRightBottom(0, 0, width, height)
} }
} }
} }