Add skip boot movie toggle (#2577)

* Add skip boot movie toggle

* Hide boot movie controls when skipping

* fix(session): resolve the skip movie key to its asset file
This commit is contained in:
Kurt Himebauch authored and GitHub committed 2026-11-13 16:17:03 -05:00
1 parent 1e6aebd216
commit 0b8a3f1ee8
7 files changed
+33 -12

No files matched your search

@@ -15,6 +15,7 @@ object BootMovie {
const val DROIDDECK_30 = "dd30"
const val DROIDDECK_60 = "dd60"
const val CUSTOM = "custom"
private const val SKIP = "skip"
const val MAX_BYTES = 50L shl 20
const val MAX_CONVERT_SECONDS = 60
val PICKER_EXTENSIONS = listOf("webm", "mkv", "mp4", "mov", "m4v", "3gp")
@@ -22,6 +23,7 @@ object BootMovie {
private val ASSETS = mapOf(
DROIDDECK_30 to "droiddeck-startup.webm",
DROIDDECK_60 to "droiddeck-startup-60.webm",
SKIP to "skip-startup.webm",
)
internal val VIDEO_CODECS = setOf(MediaFormat.MIMETYPE_VIDEO_VP8, MediaFormat.MIMETYPE_VIDEO_VP9, MediaFormat.MIMETYPE_VIDEO_AV1)
@@ -74,6 +76,7 @@ object BootMovie {
fun prepare(context: Context): File? {
BootMovieLibrary.restore(context)
if (SessionPrefs.skipBootMovie(context)) return assetFile(context, SKIP)
val source = sourceOf(context, choice(context)) ?: return null
return variant(context, source)
}
@@ -67,7 +67,7 @@ object BootMovieReport {
line("== DroidDeck state")
line("choice=${BootMovie.choice(context)} saved choice=${SessionPrefs.bootMovie(context)} pending pick=${SessionPrefs.bootMovieApplyNext(context)}")
line("last Steam path seen=${SessionPrefs.bootMovieSteamSeen(context)}")
line("sound=${SessionPrefs.bootMovieSound(context)} volume=${SessionPrefs.bootMovieVolume(context)} seconds=${SessionPrefs.bootMovieSeconds(context)}")
line("sound=${SessionPrefs.bootMovieSound(context)} volume=${SessionPrefs.bootMovieVolume(context)} seconds=${SessionPrefs.bootMovieSeconds(context)} skip=${SessionPrefs.skipBootMovie(context)}")
line("session running=${SessionState.running}")
line()
line("== The movie list as shown")
@@ -1164,6 +1164,11 @@ object SessionPrefs {
fun setBootMovieVolume(context: Context, percent: Int) { prefs(context).edit().putInt("bootMovieVolume", percent.coerceIn(0, 100)).apply() }
fun bootMovieSeconds(context: Context): Int = prefs(context).getInt("bootMovieSeconds", 0).coerceAtLeast(0)
fun setBootMovieSeconds(context: Context, seconds: Int) { prefs(context).edit().putInt("bootMovieSeconds", seconds.coerceAtLeast(0)).apply() }
fun skipBootMovie(context: Context): Boolean = prefs(context).getBoolean("skipBootMovie", false)
fun setSkipBootMovie(context: Context, on: Boolean) {
prefs(context).edit().putBoolean("skipBootMovie", on).apply()
setBootMovieApplyNext(context, true)
}
fun bootMovieApplyNext(context: Context): Boolean = prefs(context).getBoolean("bootMovieApplyNext", false)
fun setBootMovieApplyNext(context: Context, on: Boolean) { prefs(context).edit().putBoolean("bootMovieApplyNext", on).apply() }
fun bootMovieSteamSeen(context: Context): String? = prefs(context).getString("bootMovieSteamSeen", null)
@@ -25,7 +25,7 @@ object SettingsReset {
"noXalia", "fastSync", "fsyncFirst", "syncFallback", "prootNoSeccomp", "prootFastPath", "nativeUserland", "cursorComposite",
"guestHostname", "fexPreset", "forceSsbs", "logs", "gameDebugLogsEnabled", "enhancedDiagnosticsNext", "storageDiagnostics", "buildWatermark",
"upscaler", "upscaleSharpness", "screenEffects", "textureAnisotropy", "textureLodBias",
"steamDownloadsInBackground", "steam_offline", "bootMovie", "bootMovieSound", "bootMovieVolume", "bootMovieSeconds",
"steamDownloadsInBackground", "steam_offline", "bootMovie", "bootMovieSound", "bootMovieVolume", "bootMovieSeconds", "skipBootMovie",
"bootMovieApplyNext", "bootMovieSteamSeen",
"questDefaultsV1", "telemetryAuto", "telemetryOff", "statsStrip", "statsHud", "bottomHud", "bottomStripMetrics", "bottomStripTabs", "statsDash", "statsSpeedUnit",
)