mirror of
https://github.com/Droid-Deck/DroidDeck.git
synced 2026-11-22 06:15:58 +00:00
Expose the compositor's upscaler as a session setting
The Wayland compositor already carries the X11 renderer's spatial upscalers (effects_chain.c: FSR 1 EASU+RCAS, Snapdragon GSR and its quality variant, NIS, RCAS sharpen) behind WaylandCompositor.nativeSetUpscaler / nativeSetUpscaleSharpness, but nothing calls them since the Winlator-era drawer was removed, so the scene is always enlarged to the panel with a plain linear blit. Add "Upscaler" and "Upscaler sharpness" to the session page's Display group (off by default, 75%), stored in SessionPrefs and applied next to nativeSetScaleMode when the session's surface is set up. The choice is also listed in device.txt.
This commit is contained in:
1 parent
6782e5a717
commit
38d658abf5
5 files changed
+46
No files matched your search
@@ -53,6 +53,8 @@ class ModeSettings(
|
||||
val gpuDrivers: String = "Auto",
|
||||
/** Frames per second the session is capped at; 0 = none. */
|
||||
val fpsLimit: Int = 0,
|
||||
val upscaler: Int = 0,
|
||||
val upscaleSharpness: Int = 75,
|
||||
val touchMode: String,
|
||||
val suspendPolicy: String,
|
||||
/** Steam only. */
|
||||
@@ -105,6 +107,8 @@ class ModeSettingsActions(
|
||||
/** Opens the GPU drivers on the Components page: they are shared by every session. */
|
||||
val onGpuDrivers: () -> Unit = {},
|
||||
val onFpsLimit: (Int) -> Unit = {},
|
||||
val onUpscaler: (Int) -> Unit = {},
|
||||
val onUpscaleSharpness: (Int) -> Unit = {},
|
||||
val onTouch: (String) -> Unit,
|
||||
val onSuspendPolicy: (String) -> Unit,
|
||||
val onOsc: (String) -> Unit,
|
||||
@@ -177,6 +181,17 @@ fun ModeSettingsPage(s: ModeSettings, a: ModeSettingsActions) {
|
||||
note = "Caps the whole session. The screen switches to a rate the cap divides evenly.",
|
||||
onPick = a.onFpsLimit,
|
||||
)
|
||||
ChoiceRow(
|
||||
host, "upscaler", "Upscaler", "Sharpens the picture where it is enlarged to the screen.",
|
||||
com.droiddeck.launcher.session.SessionPrefs.upscalerChoices, s.upscaler,
|
||||
note = "Works only when the session is smaller than the screen; Sharpen only works at any size. Costs a little GPU time.",
|
||||
onPick = a.onUpscaler,
|
||||
)
|
||||
ChoiceRow(
|
||||
host, "upscale-sharpness", "Upscaler sharpness", null,
|
||||
com.droiddeck.launcher.session.SessionPrefs.upscaleSharpnessChoices, s.upscaleSharpness,
|
||||
enabled = s.upscaler != 0, onPick = a.onUpscaleSharpness,
|
||||
)
|
||||
if (editCustom) CustomResolutionDialog(
|
||||
initial = custom,
|
||||
onSave = { size -> editCustom = false; a.onCustomResolution(size) },
|
||||
|
||||
Reference in new issue
Block a user