Jelajahi Sumber

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.
Charles Lombardo 2 tahun lalu
induk
melakukan
b3a1f793c3

+ 9 - 0
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()
                         }
@@ -804,6 +806,13 @@ class EmulationFragment : Fragment(), SurfaceHolder.Callback {
             }
         }
 
+        @Synchronized
+        fun updateSurface() {
+            if (surface != null) {
+                NativeLibrary.surfaceChanged(surface)
+            }
+        }
+
         @Synchronized
         fun clearSurface() {
             if (surface == null) {