Add setting to change default content scaling (#77)

Closes #53 #71

Adds an advanced playback setting to set a different default global
content scaling. It can still be changed per playback as well.
This commit is contained in:
damontecres 2025-10-27 14:25:07 -04:00 committed by GitHub
parent 4269d27dad
commit bafd635402
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
6 changed files with 48 additions and 2 deletions

View file

@ -522,6 +522,19 @@ sealed interface AppPreference<T> {
valueToIndex = { it.number },
)
val GlobalContentScale =
AppChoicePreference<PrefContentScale>(
title = R.string.global_content_scale,
defaultValue = PrefContentScale.FIT,
getter = { it.playbackPreferences.globalContentScale },
setter = { prefs, value ->
prefs.updatePlaybackPreferences { globalContentScale = value }
},
displayValues = R.array.content_scale,
indexToValue = { PrefContentScale.forNumber(it) },
valueToIndex = { it.number },
)
val ClearImageCache =
AppClickablePreference(
title = R.string.clear_image_cache,
@ -639,6 +652,7 @@ val advancedPreferences =
title = R.string.playback_overrides,
preferences =
listOf(
AppPreference.GlobalContentScale,
AppPreference.DownMixStereo,
AppPreference.Ac3Supported,
AppPreference.DirectPlayAss,