From fb2a3d4dd8818d359e5c1dd3e5ee4a6d98d43ede Mon Sep 17 00:00:00 2001 From: The412Banner Date: Tue, 22 Sep 2026 17:53:43 -0400 Subject: [PATCH] session: the desktop caps at 720p by default too --- README.md | 4 ++-- .../com/steamdeck/launcher/SessionActivity.kt | 6 +++--- .../steamdeck/launcher/session/SessionPrefs.kt | 15 ++++++++------- 3 files changed, 13 insertions(+), 12 deletions(-) diff --git a/README.md b/README.md index f71b5b2493..6947aec248 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** (the client up to 720p by default, the desktop -1080p; 900p, 1080p, or the panel's own), the display **shape**, **HDR10 output**, the +so the main screen keeps only what applies to both: **resolution** (up to 720p by default; 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 59811b0cfa..d0f2438ba2 100644 --- a/app/src/main/java/com/steamdeck/launcher/SessionActivity.kt +++ b/app/src/main/java/com/steamdeck/launcher/SessionActivity.kt @@ -397,9 +397,9 @@ 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) - // 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 + // 720 tall at most by default, client and desktop alike: 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) 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 d5fa4a1cf0..155182b57f 100644 --- a/app/src/main/java/com/steamdeck/launcher/session/SessionPrefs.kt +++ b/app/src/main/java/com/steamdeck/launcher/session/SessionPrefs.kt @@ -186,16 +186,17 @@ 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. 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. + * 0 = the panel's own height, otherwise a cap. Both modes default to 720p: the client's 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 + * and the emulators under it get the same GPU headroom. Read once, when the session's display + * is sized; a cap the user chose wins over the default. */ 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 + /** What a mode gets when nothing was chosen. */ + @Suppress("UNUSED_PARAMETER") + fun defaultResolutionCap(mode: String): Int = 720 fun setResolutionCap(context: Context, mode: String, cap: Int) { prefs(context).edit().putInt("resolutionCap.$mode", cap).apply()