mirror of
https://github.com/Droid-Deck/DroidDeck.git
synced 2026-11-21 13:55:58 +00:00
feat: toggle Steam shader pre-caching from DroidDeck's Steam settings
This commit is contained in:
1 parent
f683ca1dea
commit
f88227ed74
12 files changed
+216
-5
No files matched your search
@@ -82,6 +82,8 @@ class ModeSettings(
|
||||
val steamClientArch: String? = null,
|
||||
/** Steam only: a game launched from the front end returns there when it closes; null hides the row. */
|
||||
val returnAfterGame: Boolean? = null,
|
||||
/** Steam only: the client's Shader Pre-Caching setting; null hides the row. */
|
||||
val shaderPrecache: Boolean? = null,
|
||||
val steamRepairQueued: Boolean = false,
|
||||
val mangoapp: Boolean = true,
|
||||
val steamController: String? = null,
|
||||
@@ -136,6 +138,7 @@ class ModeSettingsActions(
|
||||
val onSteamClientArch: (String) -> Unit = {},
|
||||
val onMangoapp: (Boolean) -> Unit = {},
|
||||
val onReturnAfterGame: (Boolean) -> Unit = {},
|
||||
val onShaderPrecache: (Boolean) -> Unit = {},
|
||||
val onSteamController: (String) -> Unit = {},
|
||||
val onUnfoldedControls: (Boolean) -> Unit = {},
|
||||
val onUnfoldedControlsWithController: (Boolean) -> Unit = {},
|
||||
@@ -478,6 +481,11 @@ fun ModeSheetRows(s: ModeSettings, a: ModeSettingsActions, tab: String, extras:
|
||||
stringResource(R.string.mode_return_after_game_hint),
|
||||
s.returnAfterGame, onChange = a.onReturnAfterGame,
|
||||
)
|
||||
if (s.shaderPrecache != null) ToggleRow(
|
||||
host, "shaderprecache", stringResource(R.string.mode_shader_precache),
|
||||
stringResource(R.string.mode_shader_precache_hint),
|
||||
s.shaderPrecache, onChange = a.onShaderPrecache,
|
||||
)
|
||||
SettingsRow(
|
||||
stringResource(R.string.mode_steam_repair),
|
||||
stringResource(if (s.steamRepairQueued) R.string.mode_steam_repair_queued else R.string.mode_steam_repair_hint),
|
||||
|
||||
Reference in new issue
Block a user