aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorgerman77 <juangerman-13@hotmail.com>2023-06-13 00:13:42 -0600
committergerman77 <juangerman-13@hotmail.com>2023-06-13 00:17:10 -0600
commit110f8ea1678b80d9252ce3ca5cc083ac02aedcd1 (patch)
tree32c74abfb690670cd4891a7679e2cb4d7ca62f50 /src
parentf631b3a39a4986e52aa359a94186c0752cc58de9 (diff)
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 c8ef8c1fdb..d89a899836 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(
newWidth = width
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 {
- setMeasuredDimension(width, height)
+ setLeftTopRightBottom(0, 0, width, height)
}
}
}