Update src/android/app/src/main/java/org/yuzu/yuzu_emu/fragments/EmulationFragment.kt
All checks were successful
eden-license / license-header (pull_request) Successful in 47s
All checks were successful
eden-license / license-header (pull_request) Successful in 47s
This commit is contained in:
parent
aa4fac61a1
commit
a2b00bae31
1 changed files with 10 additions and 9 deletions
|
@ -845,9 +845,9 @@ class EmulationFragment : Fragment(), SurfaceHolder.Callback {
|
||||||
}
|
}
|
||||||
|
|
||||||
private fun updateQuickOverlayMenuEntry(isVisible: Boolean) {
|
private fun updateQuickOverlayMenuEntry(isVisible: Boolean) {
|
||||||
val menu = binding?.inGameMenu?.menu ?: return
|
val b = _binding ?: return
|
||||||
val item = menu.findItem(R.id.menu_quick_overlay) ?: return
|
val item = b.inGameMenu.findItem(R.id.menu_quick_overlay) ?: return
|
||||||
|
|
||||||
if (isVisible) {
|
if (isVisible) {
|
||||||
item.title = getString(R.string.emulation_hide_overlay)
|
item.title = getString(R.string.emulation_hide_overlay)
|
||||||
item.icon = ResourcesCompat.getDrawable(
|
item.icon = ResourcesCompat.getDrawable(
|
||||||
|
@ -866,8 +866,8 @@ class EmulationFragment : Fragment(), SurfaceHolder.Callback {
|
||||||
}
|
}
|
||||||
|
|
||||||
private fun updatePauseMenuEntry(isPaused: Boolean) {
|
private fun updatePauseMenuEntry(isPaused: Boolean) {
|
||||||
val menu = binding?.inGameMenu?.menu ?: return
|
val b = _binding ?: return
|
||||||
val pauseItem = menu.findItem(R.id.menu_pause_emulation) ?: return
|
val pauseItem = b.inGameMenu.findItem(R.id.menu_pause_emulation) ?: return
|
||||||
if (isPaused) {
|
if (isPaused) {
|
||||||
pauseItem.title = getString(R.string.emulation_unpause)
|
pauseItem.title = getString(R.string.emulation_unpause)
|
||||||
pauseItem.icon = ResourcesCompat.getDrawable(
|
pauseItem.icon = ResourcesCompat.getDrawable(
|
||||||
|
@ -886,9 +886,11 @@ class EmulationFragment : Fragment(), SurfaceHolder.Callback {
|
||||||
}
|
}
|
||||||
|
|
||||||
override fun onPause() {
|
override fun onPause() {
|
||||||
if (emulationState.isRunning && emulationActivity?.isInPictureInPictureMode != true) {
|
if (this::emulationState.isInitialized) {
|
||||||
emulationState.pause()
|
if (emulationState.isRunning && emulationActivity?.isInPictureInPictureMode != true) {
|
||||||
updatePauseMenuEntry(true)
|
emulationState.pause()
|
||||||
|
updatePauseMenuEntry(true)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
super.onPause()
|
super.onPause()
|
||||||
}
|
}
|
||||||
|
@ -905,7 +907,6 @@ class EmulationFragment : Fragment(), SurfaceHolder.Callback {
|
||||||
|
|
||||||
override fun onResume() {
|
override fun onResume() {
|
||||||
super.onResume()
|
super.onResume()
|
||||||
|
|
||||||
val b = _binding ?: return
|
val b = _binding ?: return
|
||||||
updateStatsPosition(IntSetting.PERF_OVERLAY_POSITION.getInt())
|
updateStatsPosition(IntSetting.PERF_OVERLAY_POSITION.getInt())
|
||||||
updateSocPosition(IntSetting.SOC_OVERLAY_POSITION.getInt())
|
updateSocPosition(IntSetting.SOC_OVERLAY_POSITION.getInt())
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue