diff options
| author | 2023-06-13 14:01:02 -0400 | |
|---|---|---|
| committer | 2023-06-13 14:01:02 -0400 | |
| commit | 0644c9d6cbd76b28bb808f87c262b5c28fff035a (patch) | |
| tree | 8c2d804206fb04931b6e18fdaa9cd47f6b384a19 | |
| parent | Merge pull request #10747 from liamwhite/arm-interface-decouple (diff) | |
| parent | android: Fix touch input (diff) | |
| download | yuzu-0644c9d6cbd76b28bb808f87c262b5c28fff035a.tar.gz yuzu-0644c9d6cbd76b28bb808f87c262b5c28fff035a.tar.xz yuzu-0644c9d6cbd76b28bb808f87c262b5c28fff035a.zip | |
Merge pull request #10751 from german77/touch
android: Fix touch input
| -rw-r--r-- | src/android/app/src/main/java/org/yuzu/yuzu_emu/views/FixedRatioSurfaceView.kt | 6 |
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 | } |