feat: Start without Steam, a per-game switch for games that close right away

A game that closes as soon as it starts can be tripped by Proton's Steam
setup (steam.exe, the Steam registry entries, the Steam client bridge).
The Games page of the session drawer gets a per-game Start without Steam
switch, stored as DROIDDECK_NO_STEAM=1 in the game's environment and listed
in its profile summary.

droiddeck-game-env acts on it for a game launch only: a Proton with umu's
launch (GE-Proton, Proton-CachyOS, DroidDeck-Proton) gets UMU_ID, so it
runs umu.exe in place of steam.exe and still sets up the prefix; a Steam
game keeps its protonfixes under its own id, an added game gets 0. Any
other Proton runs the game straight in the prefix (runinprefix).
This commit is contained in:
The412Banner committed 2026-10-12 13:55:56 -04:00
1 parent 1ceb1b87b7
commit 0cfb994924
9 files changed
+144 -2

No files matched your search

@@ -273,6 +273,9 @@ class DrawerActions(
val onSelectedGameProfileRefresh: () -> Unit = {},
val gameFexPresetSaving: Boolean = false,
val onGameFexPreset: (Long, String?) -> Unit = { _, _ -> },
/** Saves the selected game's Start without Steam (GameEnvironment.NO_STEAM). */
val gameNoSteamSaving: Boolean = false,
val onGameNoSteam: (Long, Boolean) -> Unit = { _, _ -> },
/** Swaps [value] ("orig:<build>" or a stored package file) into a Proton's component. */
val onComponentSwap: (protonId: String, comp: String, value: String) -> Unit = { _, _, _ -> },
/** Saves a stored package for a game, or null to inherit that component from the Default profile. */
@@ -515,6 +518,7 @@ internal fun SessionDrawer(open: Boolean, requestedPage: SessionDrawerPage, cont
TextureFilteringGroup(host, a) { key -> focus.track(page, key) }
if (a.steam) SettingsGroup(stringResource(R.string.game_settings_title)) {
DrawerFexPresetRow(host, a, focus.track(page, "fex"))
DrawerNoSteamRow(host, a, focus.track(page, "no-steam"))
GameEnvironmentRow(
modifier = focus.track(page, "game-env"),
showHint = false,
@@ -940,6 +944,17 @@ private fun DrawerFexPresetRow(host: MenuHost, a: DrawerActions, modifier: Modif
}
}
/** A game's Start without Steam; only with a game selected - the Default profile has no such switch. */
@Composable
private fun DrawerNoSteamRow(host: MenuHost, a: DrawerActions, modifier: Modifier) {
val appId = a.selectedGameProfileId ?: return
val profile = a.selectedGameProfile?.takeIf { it.appId == appId } ?: return
ToggleRow(
host, "no-steam", stringResource(R.string.game_no_steam_title), stringResource(R.string.game_no_steam_detail),
profile.startWithoutSteam, enabled = !a.gameNoSteamSaving, chipModifier = modifier,
) { on -> a.onGameNoSteam(appId, on) }
}
/** Texture filtering on the Games page: DXVK options for the next DirectX 9-11 launch. */
@Composable
private fun TextureFilteringGroup(host: MenuHost, a: DrawerActions, track: (String) -> Modifier) {
@@ -1028,6 +1043,9 @@ private fun SelectedGameProfileGroup(host: MenuHost, a: DrawerActions, track: (S
ProfileSummaryRow(ComponentsManager.LABEL.getValue(component), profileValueLabel(value))
}
}
if (profile.startWithoutSteam) {
ProfileSummaryRow(stringResource(R.string.game_no_steam_title), stringResource(R.string.game_no_steam_on))
}
if (profile.environmentOverrides > 0) {
ProfileSummaryRow(
stringResource(R.string.game_env_title),