mirror of
https://github.com/Droid-Deck/DroidDeck.git
synced 2026-11-18 12:28:40 +00:00
Feat: Add new button for integer scalling, adds tolerancy and rename (#2690)
* Add integer scaling mode * Fix integer scaling view-space input bounds * Improve integer scaling tolerance * Add Fit and Auto scaling toggle to session drawer * Translate Fit and Integer scaling labels * Clarify integer scaling cropping hint * Update integer scaling hint across translations * Fix integer scaling settings and translations * Fix controller input for integer scaling * Complete integer scaling hint translations * Fix integer scaling hint translations * Restore XML declaration quote style * Use double quotes in XML declarations * Add missing norugeuingz translatisn * fix: include math.h for roundf integer scaling * fix: link math library in Vulkan caller tests * Fix integer scaling translations * Fix Italian integer scaling string * Fix Italian scaling hint apostrophe
This commit is contained in:
1 parent
37a816c212
commit
a8c1a9ff4d
38 files changed
+136
-48
No files matched your search
@@ -1447,6 +1447,12 @@ class SessionActivity : ComponentActivity(), SurfaceHolder.Callback, com.droidde
|
||||
onHudReset = { hudConfig = DroidDeckHudConfig.reset(this@SessionActivity); hud.applyConfig() },
|
||||
onHudOrderReset = { hudConfig = DroidDeckHudConfig.clearOrder(this@SessionActivity); hud.applyConfig() },
|
||||
onHudExport = { exportHudDiagnostics() },
|
||||
integerScaling = integerScaling,
|
||||
onIntegerScaling = { enabled ->
|
||||
SessionPrefs.setIntegerScaling(this@SessionActivity, enabled)
|
||||
integerScaling = enabled
|
||||
applyGameAlignment()
|
||||
},
|
||||
onUpscaler = { m ->
|
||||
val target = effectsEditorTarget ?: screenEffectsTarget
|
||||
val activeProfileId =
|
||||
|
||||
@@ -251,7 +251,7 @@ fun ModeSheetRows(s: ModeSettings, a: ModeSettingsActions, tab: String, extras:
|
||||
stringResource(R.string.display_integer_scaling_hint),
|
||||
listOf(
|
||||
false to stringResource(R.string.display_scaling_fit),
|
||||
true to stringResource(R.string.display_scaling_auto),
|
||||
true to stringResource(R.string.display_scaling_integer),
|
||||
),
|
||||
enabled, onPick = a.onIntegerScaling,
|
||||
)
|
||||
|
||||
@@ -244,6 +244,8 @@ class DrawerActions(
|
||||
val fexPreset: String,
|
||||
val upscaler: Int = 0,
|
||||
val upscaleSharpness: Int = 75,
|
||||
val integerScaling: Boolean = false,
|
||||
val onIntegerScaling: (Boolean) -> Unit = {},
|
||||
val effects: ScreenEffects = ScreenEffects.OFF,
|
||||
val screenEffectsTarget: String = "auto",
|
||||
val screenEffectsTargets: List<Pair<String, String>> = emptyList(),
|
||||
@@ -618,6 +620,16 @@ internal fun SessionDrawer(open: Boolean, requestedPage: SessionDrawerPage, cont
|
||||
onChange = { a.onFpsLimit(if (it <= SessionPrefs.FPS_LIMIT_OFF) 0 else it) })
|
||||
}
|
||||
SettingsGroup(stringResource(R.string.display_image_scaling)) {
|
||||
if (a.steam) SettingsRow(stringResource(R.string.display_integer_scaling), null) {
|
||||
PadTextButton(
|
||||
onClick = { a.onIntegerScaling(!a.integerScaling) }
|
||||
) {
|
||||
Text(stringResource(
|
||||
if (a.integerScaling) R.string.display_scaling_integer
|
||||
else R.string.display_scaling_fit
|
||||
))
|
||||
}
|
||||
}
|
||||
ChoiceRow(host, "upscaler", stringResource(R.string.display_filter), null,
|
||||
SessionPrefs.upscalerChoices(LocalContext.current), a.upscaler,
|
||||
note = stringResource(R.string.display_filter_note),
|
||||
|
||||
Reference in new issue
Block a user