mirror of
https://github.com/Droid-Deck/DroidDeck.git
synced 2026-11-24 23:36:04 +00:00
feat(boot-movie): add a Shuffle switch backed by Steam's startup movie shuffle setting (#2462)
* feat(boot-movie): add a Shuffle switch backed by Steam's startup movie shuffle setting * test(boot-movie): keep unrelated settings unchanged * fix(boot-movie): keep the Shuffle choice across reset, unreadable configs and running sessions * fix(boot-movie): track the Shuffle baseline per Steam home and only for values staging wrote * fix(boot-movie): adopt a Shuffle change made in the inactive Steam home before staging overwrites it * fix(boot-movie): keep the 60 fps note under the Installed movies row
This commit is contained in:
1 parent
cbcf39d7c2
commit
03812bb3b7
41 files changed
+372
-108
No files matched your search
@@ -160,7 +160,7 @@ internal fun BootMovieGroup(s: ModeSettings, a: ModeSettingsActions, host: MenuH
|
||||
TabChip(stringResource(R.string.boot_movie_tab_sound), tab == MovieTab.SOUND, Modifier.weight(1f)) { tab = MovieTab.SOUND }
|
||||
}
|
||||
when (tab) {
|
||||
MovieTab.INSTALLED -> InstalledTab(a)
|
||||
MovieTab.INSTALLED -> InstalledTab(a, host)
|
||||
MovieTab.IMPORT -> ImportTab(s, a)
|
||||
MovieTab.REPO -> RepoTab(a)
|
||||
MovieTab.SOUND -> SoundTab(s, a, host)
|
||||
@@ -170,7 +170,7 @@ internal fun BootMovieGroup(s: ModeSettings, a: ModeSettingsActions, host: MenuH
|
||||
}
|
||||
|
||||
@Composable
|
||||
private fun InstalledTab(a: ModeSettingsActions) {
|
||||
private fun InstalledTab(a: ModeSettingsActions, host: MenuHost) {
|
||||
var browsing by remember { mutableStateOf(false) }
|
||||
val snapshot = rememberMovies(0, a.onBootMovieChanged)
|
||||
val current = snapshot?.let { snap -> snap.entries.firstOrNull { it.id == snap.selected }?.title }
|
||||
@@ -183,6 +183,12 @@ private fun InstalledTab(a: ModeSettingsActions) {
|
||||
modifier = Modifier.padding(horizontal = 14.dp).padding(bottom = 12.dp),
|
||||
)
|
||||
val app = LocalContext.current.applicationContext
|
||||
var shuffle by remember { mutableStateOf(SessionPrefs.bootMovieShuffle(app)) }
|
||||
LaunchedEffect(snapshot) { shuffle = SessionPrefs.bootMovieShuffle(app) }
|
||||
ToggleRow(
|
||||
host, "boot-movie-shuffle", stringResource(R.string.boot_movie_shuffle),
|
||||
stringResource(R.string.common_applies_next_session), shuffle,
|
||||
) { on -> shuffle = on; SessionPrefs.setBootMovieShuffle(app, on) }
|
||||
val scope = rememberCoroutineScope()
|
||||
var saving by remember { mutableStateOf(false) }
|
||||
val debugging = remember { com.droiddeck.launcher.agent.AgentAccess.commandsEnabled(app) }
|
||||
|
||||
Reference in new issue
Block a user