From 8c97827d078f79a38d7cbed0afc6543c350ee09b Mon Sep 17 00:00:00 2001 From: Kleidis Date: Sat, 30 Nov 2024 16:23:25 +0100 Subject: [PATCH] android: Update emulation_pause icon on resume If the fragment got paused while emualtionState also was paused manually via the menu bar, once the fragment got unpasued , the binding would still remain paused --- .../org/citra/citra_emu/fragments/EmulationFragment.kt | 8 ++++++++ 1 file changed, 8 insertions(+) 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 b04eeeb38..f2abe0d47 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 @@ -455,6 +455,14 @@ class EmulationFragment : Fragment(), SurfaceHolder.Callback, Choreographer.Fram Choreographer.getInstance().postFrameCallback(this) if (NativeLibrary.isRunning()) { NativeLibrary.unPauseEmulation() + binding.inGameMenu.menu.findItem(R.id.menu_emulation_pause)?.let { menuItem -> + menuItem.title = resources.getString(R.string.pause_emulation) + menuItem.icon = ResourcesCompat.getDrawable( + resources, + R.drawable.ic_pause, + requireContext().theme + ) + } return }