Android: Handle game shutdown in onTitleChanged

This commit is contained in:
JosJuice 2023-06-23 20:40:04 +02:00
parent 51dfc03805
commit b5e197e2dc
1 changed files with 7 additions and 2 deletions

View File

@ -234,9 +234,14 @@ class EmulationActivity : AppCompatActivity(), ThemeProvider {
menuToastShown = true
}
title = NativeLibrary.GetCurrentTitleDescription()
try {
title = NativeLibrary.GetCurrentTitleDescription()
emulationFragment?.refreshInputOverlay()
emulationFragment?.refreshInputOverlay()
} catch (_: IllegalStateException) {
// Most likely the core delivered an onTitleChanged while emulation was shutting down.
// Let's just ignore it, since we're about to shut down anyway.
}
}
override fun onDestroy() {