mirror of
https://github.com/skyline-emu/skyline.git
synced 2024-11-23 08:19:17 +01: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:configChanges="orientation|screenSize|uiMode"
|
||||||
android:exported="true"
|
android:exported="true"
|
||||||
android:launchMode="singleTask"
|
android:launchMode="singleTask"
|
||||||
|
android:process=":emulationProcess"
|
||||||
android:parentActivityName=".MainActivity">
|
android:parentActivityName=".MainActivity">
|
||||||
|
|
||||||
<intent-filter>
|
<intent-filter>
|
||||||
|
@ -219,7 +219,7 @@ class EmulationActivity : AppCompatActivity(), SurfaceHolder.Callback, View.OnTo
|
|||||||
shouldFinish = false
|
shouldFinish = false
|
||||||
if (returnToMain)
|
if (returnToMain)
|
||||||
startActivity(Intent(applicationContext, MainActivity::class.java).setFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP))
|
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