From d1ced8706fad5e894edbd55a90d8ca175580d884 Mon Sep 17 00:00:00 2001 From: The412Banner Date: Tue, 22 Sep 2026 17:49:29 -0400 Subject: [PATCH] session: the Steam client's display caps at 720p by default (desktop stays 1080); a chosen cap still wins --- README.md | 4 ++-- .../java/com/steamdeck/launcher/SessionActivity.kt | 7 ++++--- .../com/steamdeck/launcher/session/SessionPrefs.kt | 13 +++++++++---- .../com/steamdeck/launcher/ui/ModeSettingsDialog.kt | 8 +++++--- 4 files changed, 20 insertions(+), 12 deletions(-) diff --git a/README.md b/README.md index 5046da8273..f71b5b2493 100644 --- a/README.md +++ b/README.md @@ -364,8 +364,8 @@ any game. The dialog queues or cancels a request and removes an installed build. ## The cog beside Play and Desktop Each launch button has a cog, and everything that only matters for that one mode lives behind it, -so the main screen keeps only what applies to both: **resolution** (up to 1080p by default, 900p or -720p for a lighter session, or the panel's own), the display **shape**, **HDR10 output**, the +so the main screen keeps only what applies to both: **resolution** (the client up to 720p by default, the desktop +1080p; 900p, 1080p, or the panel's own), the display **shape**, **HDR10 output**, the **Linux runtime driver** for that mode and the shared **display driver**, **touch**, and for Steam the on-screen controls and audio, for the desktop its renderer. diff --git a/app/src/main/java/com/steamdeck/launcher/SessionActivity.kt b/app/src/main/java/com/steamdeck/launcher/SessionActivity.kt index a3e5a87730..59811b0cfa 100644 --- a/app/src/main/java/com/steamdeck/launcher/SessionActivity.kt +++ b/app/src/main/java/com/steamdeck/launcher/SessionActivity.kt @@ -397,9 +397,10 @@ class SessionActivity : ComponentActivity(), SurfaceHolder.Callback { // compositor letterboxes onto a squarer panel. val aspect = if (SessionPrefs.shapeMode(this) == SessionPrefs.SHAPE_WIDE) 16f / 9f else maxOf(panelW / panelH, 16f / 9f) - // 1080 tall at most by default: the client's CEF is the heaviest thing in the session, and - // above 1080p it costs frames for nothing anyone can see on a handheld panel. The mode's - // settings (the cog beside Play / Desktop) can lower the cap or lift it to the panel. + // Capped by default - 720 tall for the client, 1080 for the desktop: the client's CEF is the + // heaviest thing in the session, and pixels above that cost frames for nothing anyone can + // see on a handheld panel. The mode's settings (the cog beside Play / Desktop) can change + // the cap or lift it to the panel. val mode = SessionPrefs.prefMode(intent.getStringExtra(SessionService.EXTRA_MODE) ?: SessionService.MODE_STEAM) val cap = SessionPrefs.resolutionCap(this, mode) val height = (if (cap <= 0) panelH else minOf(panelH, cap.toFloat())).toInt() diff --git a/app/src/main/java/com/steamdeck/launcher/session/SessionPrefs.kt b/app/src/main/java/com/steamdeck/launcher/session/SessionPrefs.kt index 260211b8c5..d5fa4a1cf0 100644 --- a/app/src/main/java/com/steamdeck/launcher/session/SessionPrefs.kt +++ b/app/src/main/java/com/steamdeck/launcher/session/SessionPrefs.kt @@ -186,11 +186,16 @@ object SessionPrefs { /** * The tallest the session's display may be, in pixels, for MODE_STEAM / MODE_DESKTOP: - * 0 = the panel's own height, otherwise a cap. 1080 is the default the app always had - the - * client's CEF is the heaviest thing in a session and above 1080p it costs frames for nothing - * a handheld panel can show. Read once, when the session's display is sized. + * 0 = the panel's own height, otherwise a cap. The Steam client defaults to 720p: its CEF is + * the heaviest thing in a session, Big Picture is drawn for a TV at arm's length, and on a + * handheld panel 720p is where its menus stay responsive on a regular flagship. The desktop + * keeps 1080 (text and file windows want the pixels). Read once, when the session's display + * is sized; a cap the user chose wins over either default. */ - fun resolutionCap(context: Context, mode: String): Int = prefs(context).getInt("resolutionCap.$mode", 1080) + fun resolutionCap(context: Context, mode: String): Int = prefs(context).getInt("resolutionCap.$mode", defaultResolutionCap(mode)) + + /** What a mode gets when nothing was chosen: 720 for the client, 1080 for the desktop. */ + fun defaultResolutionCap(mode: String): Int = if (prefMode(mode) == SessionService.MODE_STEAM) 720 else 1080 fun setResolutionCap(context: Context, mode: String, cap: Int) { prefs(context).edit().putInt("resolutionCap.$mode", cap).apply() diff --git a/app/src/main/java/com/steamdeck/launcher/ui/ModeSettingsDialog.kt b/app/src/main/java/com/steamdeck/launcher/ui/ModeSettingsDialog.kt index 68deb97e39..3de84d0453 100644 --- a/app/src/main/java/com/steamdeck/launcher/ui/ModeSettingsDialog.kt +++ b/app/src/main/java/com/steamdeck/launcher/ui/ModeSettingsDialog.kt @@ -37,6 +37,7 @@ import androidx.compose.ui.graphics.Color import androidx.compose.ui.window.Dialog import androidx.compose.ui.window.DialogProperties import androidx.compose.ui.unit.dp +import com.steamdeck.launcher.session.SessionPrefs import com.steamdeck.launcher.session.SessionService /** One driver as the dialog shows it. [removable] is false for the runtime's own and the bundled builds. */ @@ -169,13 +170,14 @@ fun ModeSettingsDialog(s: ModeSettings, a: ModeSettingsActions) { "display" -> { Section("Display", "Takes effect at the next session: gamescope sizes its display once, when it starts.") Text("Resolution", style = MaterialTheme.typography.labelLarge, modifier = Modifier.padding(top = 8.dp)) + val default = SessionPrefs.defaultResolutionCap(s.mode) listOf( - 1080 to "Up to 1080p — the default", + 1080 to "Up to 1080p", 900 to "Up to 900p", - 720 to "Up to 720p — lighter on the GPU", + 720 to "Up to 720p — lighter on the GPU, menus stay responsive", 0 to "The panel's own — above 1080p costs frames for nothing a handheld can show", ).forEach { (cap, label) -> - Choice(label, s.resolutionCap == cap) { a.onResolution(cap) } + Choice(if (cap == default) "$label — the default" else label, s.resolutionCap == cap) { a.onResolution(cap) } } Text("Shape", style = MaterialTheme.typography.labelLarge, modifier = Modifier.padding(top = 10.dp)) Choice("The panel's shape (never narrower than 16:9)", s.shapeMode == "auto") { a.onShape("auto") }