From 0be1c3caef05c134dba82b91deede560130a133a Mon Sep 17 00:00:00 2001 From: jake Date: Fri, 19 Jan 2024 17:52:59 -0500 Subject: [PATCH] black screen --- .../src/main/java/org/citra/citra_emu/LeiaHelper3D.kt | 4 +++- .../org/citra/citra_emu/fragments/EmulationFragment.kt | 10 ++++------ 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/src/android/app/src/main/java/org/citra/citra_emu/LeiaHelper3D.kt b/src/android/app/src/main/java/org/citra/citra_emu/LeiaHelper3D.kt index 03835f1cea75..ba230853011a 100644 --- a/src/android/app/src/main/java/org/citra/citra_emu/LeiaHelper3D.kt +++ b/src/android/app/src/main/java/org/citra/citra_emu/LeiaHelper3D.kt @@ -18,7 +18,9 @@ class LeiaView : InterlacedSurfaceView { fun setSurfaceListener(surfaceListener: LeiaHelper3D.SurfaceListener) { val surfaceAsset = InputViewsAsset.createEmptySurfaceForVideo { - surfaceTexture: SurfaceTexture? -> surfaceListener.onSurfaceChanged(Surface(surfaceTexture)) + surfaceTexture: SurfaceTexture? -> + Log.d("SurfaceListener", "onSurfaceChanged called") // Log debug warning + surfaceListener.onSurfaceChanged(Surface(surfaceTexture)) } setViewAsset(surfaceAsset) } diff --git a/src/android/app/src/main/java/org/citra/citra_emu/fragments/EmulationFragment.kt b/src/android/app/src/main/java/org/citra/citra_emu/fragments/EmulationFragment.kt index 6a9a256aab1d..5d3f9a49a0cd 100644 --- a/src/android/app/src/main/java/org/citra/citra_emu/fragments/EmulationFragment.kt +++ b/src/android/app/src/main/java/org/citra/citra_emu/fragments/EmulationFragment.kt @@ -168,14 +168,12 @@ class EmulationFragment : Fragment(), SurfaceHolder.Callback, Choreographer.Fram - val sL = LeiaHelper3D.SurfaceListener { - fun onSurfaceChanged(surface: Surface?) { - emulationState.newSurface(surface) - } + val sL = LeiaHelper3D.SurfaceListener{ surface -> + Log.debug("SurfaceListener onSurfaceChanged called") // Log debug warning + emulationState.newSurface(surface) } binding.surfaceEmulation.setSurfaceListener(sL) - binding.doneControlConfig.setOnClickListener { binding.doneControlConfig.visibility = View.GONE binding.surfaceInputOverlay.setIsInEditMode(false) @@ -877,7 +875,7 @@ class EmulationFragment : Fragment(), SurfaceHolder.Callback, Choreographer.Fram override fun surfaceChanged(holder: SurfaceHolder, format: Int, width: Int, height: Int) { Log.debug("[EmulationFragment] Surface changed. Resolution: " + width + "x" + height) - //emulationState.newSurface(holder.surface) + emulationState.newSurface(holder.surface) } override fun surfaceDestroyed(holder: SurfaceHolder) {