Merge pull request #11989 from JosJuice/android-title-on-shutdown

Android: Handle game shutdown in onTitleChanged
This commit is contained in:
Charles Lombardo 2023-06-28 12:48:54 -04:00 committed by GitHub
commit e185dbf857
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

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() {