mirror of
https://github.com/Droid-Deck/DroidDeck.git
synced 2026-11-20 13:26:02 +00:00
Desktop installs the runtime and the desktop on a fresh install, on the loading screen
Desktop is enabled without a runtime or the desktop package. The session's loading screen installs
whatever is missing first - the runtime, then the desktop ("downloading the desktop · 212 of 426
MB", checking, unpacking) - and starts the session when both are in. A failure ends on the loading
screen with the reason. Desktop UI and Desktop now give the same non-Adreno warning as Play before
any download.
This commit is contained in:
1 parent
2b5aae9100
commit
0ea4b584b4
3 files changed
+57
-32
No files matched your search
@@ -203,14 +203,9 @@ class MainActivity : ComponentActivity() {
|
||||
theme = theme,
|
||||
),
|
||||
FrontEndActions(
|
||||
onPlay = {
|
||||
// No runtime and not an Adreno: the same warning Setup gives, before any download.
|
||||
val warn = installed == null && !com.steamdeck.launcher.core.DeviceSupport.adreno()
|
||||
if (warn && available != null) showNonAdreno = available
|
||||
else startActivity(Intent(this, SessionActivity::class.java))
|
||||
},
|
||||
onPlay = { startSession(Intent(this, SessionActivity::class.java)) },
|
||||
onPlayDesktopUi = {
|
||||
startActivity(Intent(this, SessionActivity::class.java)
|
||||
startSession(Intent(this, SessionActivity::class.java)
|
||||
.putExtra(SessionService.EXTRA_STEAM_UI, "desktop"))
|
||||
},
|
||||
onSteamGame = { g ->
|
||||
@@ -218,7 +213,7 @@ class MainActivity : ComponentActivity() {
|
||||
.putExtra(SessionService.EXTRA_STEAM_URL, "steam://rungameid/${g.gameId}"))
|
||||
},
|
||||
onDesktop = {
|
||||
startActivity(Intent(this, SessionActivity::class.java)
|
||||
startSession(Intent(this, SessionActivity::class.java)
|
||||
.putExtra(SessionService.EXTRA_MODE, SessionService.MODE_DESKTOP))
|
||||
},
|
||||
onEmulator = { e -> launchProgram(e.program) },
|
||||
@@ -693,6 +688,13 @@ class MainActivity : ComponentActivity() {
|
||||
install(release)
|
||||
}
|
||||
|
||||
/** Starts a session; with no runtime on a non-Adreno, the same warning Setup gives comes first, before any download. */
|
||||
private fun startSession(intent: Intent) {
|
||||
val warn = installed == null && !com.steamdeck.launcher.core.DeviceSupport.adreno()
|
||||
if (warn && available != null) showNonAdreno = available
|
||||
else startActivity(intent)
|
||||
}
|
||||
|
||||
private fun install(release: LinuxRuntimeInstaller.Release) {
|
||||
busy = true
|
||||
failed = false
|
||||
|
||||
Reference in new issue
Block a user