Browse Source
Merge pull request #10751 from german77/touch
android: Fix touch input
pull/15/merge
Charles Lombardo
3 years ago
committed by
GitHub
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with
4 additions and
2 deletions
-
src/android/app/src/main/java/org/yuzu/yuzu_emu/views/FixedRatioSurfaceView.kt
|
|
@ -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) |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
} |