Stop emulation state if initialized on destroy

Ensure emulation state is stopped during destruction.
This commit is contained in:
bug 2026-04-06 00:02:52 +01:00 committed by GitHub
parent 06a535f50e
commit 5a0808d989
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -543,6 +543,9 @@ class EmulationFragment : Fragment(), SurfaceHolder.Callback, Choreographer.Fram
}
override fun onDestroy() {
if (::emulationState.isInitialized) {
emulationState.stop()
}
EmulationLifecycleUtil.removeHook(onPause)
EmulationLifecycleUtil.removeHook(onShutdown)
if (gameFd != null) {