Browse Source

android: Fix touch input

nce_cpp
german77 3 years ago
parent
commit
110f8ea167
  1. 6
      src/android/app/src/main/java/org/yuzu/yuzu_emu/views/FixedRatioSurfaceView.kt

6
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)
}
}
}
Loading…
Cancel
Save