summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorGravatar german772023-06-13 00:13:42 -0600
committerGravatar german772023-06-13 00:17:10 -0600
commit322ac1c20cfc1ad79abaa8032f747ce94108975c (patch)
tree32c74abfb690670cd4891a7679e2cb4d7ca62f50 /src
parentMerge pull request #10743 from FearlessTobi/translations (diff)
downloadyuzu-322ac1c20cfc1ad79abaa8032f747ce94108975c.tar.gz
yuzu-322ac1c20cfc1ad79abaa8032f747ce94108975c.tar.xz
yuzu-322ac1c20cfc1ad79abaa8032f747ce94108975c.zip
android: Fix touch input
Diffstat (limited to 'src')
-rw-r--r--src/android/app/src/main/java/org/yuzu/yuzu_emu/views/FixedRatioSurfaceView.kt6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/android/app/src/main/java/org/yuzu/yuzu_emu/views/FixedRatioSurfaceView.kt b/src/android/app/src/main/java/org/yuzu/yuzu_emu/views/FixedRatioSurfaceView.kt
index c8ef8c1fd..d89a89983 100644
--- a/src/android/app/src/main/java/org/yuzu/yuzu_emu/views/FixedRatioSurfaceView.kt
+++ b/src/android/app/src/main/java/org/yuzu/yuzu_emu/views/FixedRatioSurfaceView.kt
@@ -38,9 +38,11 @@ class FixedRatioSurfaceView @JvmOverloads constructor(
38 newWidth = width 38 newWidth = width
39 newHeight = (width / aspectRatio).roundToInt() 39 newHeight = (width / aspectRatio).roundToInt()
40 } 40 }
41 setMeasuredDimension(newWidth, newHeight) 41 val left = (width - newWidth) / 2;
42 val top = (height - newHeight) / 2;
43 setLeftTopRightBottom(left, top, left + newWidth, top + newHeight)
42 } else { 44 } else {
43 setMeasuredDimension(width, height) 45 setLeftTopRightBottom(0, 0, width, height)
44 } 46 }
45 } 47 }
46} 48}