mirror of
https://github.com/Droid-Deck/DroidDeck.git
synced 2026-11-19 21:06:09 +00:00
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:
1 parent
a2a9586b54
commit
40bca96db5
9 files changed
+144
-2
No files matched your search
@@ -65,6 +65,13 @@ object GameEnvironmentStore {
|
||||
return config
|
||||
}
|
||||
|
||||
@Synchronized
|
||||
fun setGameNoSteam(context: Context, scope: String, on: Boolean): GameEnvironment.Config {
|
||||
val config = GameEnvironment.withGameNoSteam(read(context), scope, on)
|
||||
save(context, config)
|
||||
return config
|
||||
}
|
||||
|
||||
@Synchronized
|
||||
fun publish(context: Context, config: GameEnvironment.Config = read(context)) {
|
||||
val resolved = config.copy(shared = GameEnvironment.defaults(SessionPrefs.fexPreset(context), SessionPrefs.forceSsbs(context)) + config.shared)
|
||||
|
||||
@@ -16,13 +16,16 @@ data class SelectedGameProfile(
|
||||
val componentFiles: Map<String, String>,
|
||||
val environmentOverrides: Int,
|
||||
val windowsComponentNames: List<String>,
|
||||
/** Start without Steam (GameEnvironment.NO_STEAM) is on for this game. */
|
||||
val startWithoutSteam: Boolean = false,
|
||||
) {
|
||||
val hasOverrides: Boolean
|
||||
get() = !fexPreset.inherited ||
|
||||
!proton.inherited ||
|
||||
components.values.any { !it.inherited } ||
|
||||
environmentOverrides > 0 ||
|
||||
windowsComponentNames.isNotEmpty()
|
||||
windowsComponentNames.isNotEmpty() ||
|
||||
startWithoutSteam
|
||||
|
||||
companion object {
|
||||
fun resolve(
|
||||
@@ -50,7 +53,9 @@ data class SelectedGameProfile(
|
||||
inherited = override == null,
|
||||
)
|
||||
}
|
||||
val otherEnvironment = environment.games[game.profileKey].orEmpty().keys - FexPreset.environmentKeys
|
||||
// Start without Steam is a switch of its own on the Games page, listed by name.
|
||||
val otherEnvironment = environment.games[game.profileKey].orEmpty().keys - FexPreset.environmentKeys -
|
||||
GameEnvironment.NO_STEAM
|
||||
return SelectedGameProfile(
|
||||
appId = selectedAppId,
|
||||
name = game.name,
|
||||
@@ -64,6 +69,7 @@ data class SelectedGameProfile(
|
||||
componentFiles = gameComponents,
|
||||
environmentOverrides = otherEnvironment.size,
|
||||
windowsComponentNames = gameWindowsComponents.map(WinComponentNames::of),
|
||||
startWithoutSteam = GameEnvironment.gameNoSteam(environment, game.profileKey),
|
||||
)
|
||||
}
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user