mirror of
https://github.com/skyline-emu/skyline.git
synced 2024-12-28 09:25:29 +03:00
Run emulation in a separate process
Exiting from emulation has always been a big issue for Skyline, with guest and host threads that would keep running in the background unless the app was manually killed. Running emulation in a separate process allows us to kill it when we are done, avoiding the need for complex exiting management code.
This commit is contained in:
parent
281562ccdb
commit
cc71e7b56c
@ -68,6 +68,7 @@
|
||||
android:configChanges="orientation|screenSize|uiMode"
|
||||
android:exported="true"
|
||||
android:launchMode="singleTask"
|
||||
android:process=":emulationProcess"
|
||||
android:parentActivityName=".MainActivity">
|
||||
|
||||
<intent-filter>
|
||||
|
@ -219,7 +219,7 @@ class EmulationActivity : AppCompatActivity(), SurfaceHolder.Callback, View.OnTo
|
||||
shouldFinish = false
|
||||
if (returnToMain)
|
||||
startActivity(Intent(applicationContext, MainActivity::class.java).setFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP))
|
||||
finishAffinity()
|
||||
Process.killProcess(Process.myPid())
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user