mirror of
https://github.com/azahar-emu/azahar.git
synced 2026-06-06 02:33:44 -04:00
Stop emulation state if initialized on destroy
Ensure emulation state is stopped during destruction.
This commit is contained in:
parent
06a535f50e
commit
5a0808d989
1 changed files with 3 additions and 0 deletions
|
|
@ -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) {
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue