aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCharles Lombardo <clombardo169@gmail.com>2023-11-03 13:31:06 -0400
committerCharles Lombardo <clombardo169@gmail.com>2023-11-03 13:31:06 -0400
commitb3a1f793c3792dce9fb38c764d0ee9ee38d66783 (patch)
treead2ff8b253582ac5a190a2cb67dd269af36c92da
parenteda403388af14b55d56753b4f887fadec129522c (diff)
android: Update surface parameters on emulation start
This adds a quick update that notifies the render surface if there was a change between surface creation and emulation starting.
-rw-r--r--src/android/app/src/main/java/org/yuzu/yuzu_emu/fragments/EmulationFragment.kt9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/android/app/src/main/java/org/yuzu/yuzu_emu/fragments/EmulationFragment.kt b/src/android/app/src/main/java/org/yuzu/yuzu_emu/fragments/EmulationFragment.kt
index 07bd78bf72..c456c05921 100644
--- a/src/android/app/src/main/java/org/yuzu/yuzu_emu/fragments/EmulationFragment.kt
+++ b/src/android/app/src/main/java/org/yuzu/yuzu_emu/fragments/EmulationFragment.kt
@@ -312,6 +312,8 @@ class EmulationFragment : Fragment(), SurfaceHolder.Callback {
ViewUtils.showView(binding.surfaceInputOverlay)
ViewUtils.hideView(binding.loadingIndicator)
+ emulationState.updateSurface()
+
// Setup overlay
updateShowFpsOverlay()
}
@@ -805,6 +807,13 @@ class EmulationFragment : Fragment(), SurfaceHolder.Callback {
}
@Synchronized
+ fun updateSurface() {
+ if (surface != null) {
+ NativeLibrary.surfaceChanged(surface)
+ }
+ }
+
+ @Synchronized
fun clearSurface() {
if (surface == null) {
Log.warning("[EmulationFragment] clearSurface called, but surface already null.")