summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorGravatar Charles Lombardo2023-11-03 13:31:06 -0400
committerGravatar Charles Lombardo2023-11-03 13:31:06 -0400
commitb3a1f793c3792dce9fb38c764d0ee9ee38d66783 (patch)
treead2ff8b253582ac5a190a2cb67dd269af36c92da /src
parentMerge pull request #11948 from german77/hard_ring (diff)
downloadyuzu-b3a1f793c3792dce9fb38c764d0ee9ee38d66783.tar.gz
yuzu-b3a1f793c3792dce9fb38c764d0ee9ee38d66783.tar.xz
yuzu-b3a1f793c3792dce9fb38c764d0ee9ee38d66783.zip
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.
Diffstat (limited to 'src')
-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 07bd78bf7..c456c0592 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 {
312 ViewUtils.showView(binding.surfaceInputOverlay) 312 ViewUtils.showView(binding.surfaceInputOverlay)
313 ViewUtils.hideView(binding.loadingIndicator) 313 ViewUtils.hideView(binding.loadingIndicator)
314 314
315 emulationState.updateSurface()
316
315 // Setup overlay 317 // Setup overlay
316 updateShowFpsOverlay() 318 updateShowFpsOverlay()
317 } 319 }
@@ -805,6 +807,13 @@ class EmulationFragment : Fragment(), SurfaceHolder.Callback {
805 } 807 }
806 808
807 @Synchronized 809 @Synchronized
810 fun updateSurface() {
811 if (surface != null) {
812 NativeLibrary.surfaceChanged(surface)
813 }
814 }
815
816 @Synchronized
808 fun clearSurface() { 817 fun clearSurface() {
809 if (surface == null) { 818 if (surface == null) {
810 Log.warning("[EmulationFragment] clearSurface called, but surface already null.") 819 Log.warning("[EmulationFragment] clearSurface called, but surface already null.")