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
This commit is contained in:
Kleidis 2024-11-30 16:23:25 +01:00 committed by OpenSauce
parent 43dbe42b29
commit 7d9381f7c1

View File

@ -447,6 +447,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
}