From 18364845ad7154d68b85ad33c90f93b0d1198af1 Mon Sep 17 00:00:00 2001 From: The412Banner Date: Sat, 19 Sep 2026 15:54:25 -0400 Subject: [PATCH] Display shape: the panel's own or a fixed 16:9, defaulting to 16:9 on a foldable gamescope's display cannot change size once the session is up, so a foldable that starts on one panel and opens onto the other can only be letterboxed differently, never re-shaped. A fixed 16:9 sits with modest bars on either panel; the panel's own shape fits one and leaves a strip on the other. A device with a hinge sensor defaults to 16:9; the drawer toggles it for the next session. --- README.md | 4 +++- .../com/steamdeck/launcher/SessionActivity.kt | 3 ++- .../steamdeck/launcher/session/SessionDrawer.kt | 10 ++++++++++ .../steamdeck/launcher/session/SessionPrefs.kt | 17 +++++++++++++++++ app/src/main/res/layout/session_drawer.xml | 8 ++++++++ app/src/main/res/values/strings.xml | 3 +++ 6 files changed, 43 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 039c6fa1fd..f0df560acf 100644 --- a/README.md +++ b/README.md @@ -71,7 +71,9 @@ A session belongs to a foreground service, not to the activity, so leaving Big P end it: the process stays at perceptible priority, a partial wake lock keeps the CPU from dropping the guest's threads, and a high-performance WiFi lock keeps a backgrounded download from being throttled to nothing. **Back opens the drawer**: the performance HUD switch, frame generation, on-screen controls -(auto / always / never), *Send to background* and *Stop session*. Backgrounded, Steam keeps +(auto / always / never), the display shape (the panel's own, or a fixed 16:9 — the default on a +foldable, so opening or closing it mid-session only changes the bars, never the picture; takes +effect on the next session), *Send to background* and *Stop session*. Backgrounded, Steam keeps running and the (silent) notification brings it back. A session ends only when you say so — the drawer or the notification's **Stop session** — or when the app is swiped out of recents. diff --git a/app/src/main/java/com/steamdeck/launcher/SessionActivity.kt b/app/src/main/java/com/steamdeck/launcher/SessionActivity.kt index 7f45ae3bf0..387117faa2 100644 --- a/app/src/main/java/com/steamdeck/launcher/SessionActivity.kt +++ b/app/src/main/java/com/steamdeck/launcher/SessionActivity.kt @@ -181,7 +181,8 @@ class SessionActivity : Activity(), SurfaceHolder.Callback { // (FlatOut on a Fold lost the edges of its own menus). Wider than 16:9 is fine — games and // the client cope with a phone's 20:9 — so the panel's aspect is kept above that and the // compositor letterboxes the 16:9 picture onto a squarer panel. - val aspect = maxOf(panelW / panelH, 16f / 9f) + val aspect = if (SessionPrefs.shapeMode(this) == SessionPrefs.SHAPE_WIDE) 16f / 9f + else maxOf(panelW / panelH, 16f / 9f) // 1080 tall at most: 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. val height = minOf(panelH, 1080f).toInt() diff --git a/app/src/main/java/com/steamdeck/launcher/session/SessionDrawer.kt b/app/src/main/java/com/steamdeck/launcher/session/SessionDrawer.kt index e2a9a81eb5..242e9e291b 100644 --- a/app/src/main/java/com/steamdeck/launcher/session/SessionDrawer.kt +++ b/app/src/main/java/com/steamdeck/launcher/session/SessionDrawer.kt @@ -25,6 +25,7 @@ class SessionDrawer( private val hud = root.findViewById(R.id.drawer_hud) private val frameGen = root.findViewById