From e3fe4ed94ecd916b5c7985512c417e70dfdd03ed Mon Sep 17 00:00:00 2001 From: The412Banner Date: Wed, 23 Sep 2026 13:14:36 -0400 Subject: [PATCH] Display shape: Exactly this panel, for 4:3 and 3:2 handhelds The panel's shape was never allowed narrower than 16:9 (the foldable guard), so on a 4:3 panel such as the Retroid Pocket's both choices gave 16:9 with bars. A third choice, Exactly this panel, presents the panel's own aspect with no floor; the other two are unchanged and foldables still default to 16:9. Offered in the mode settings and the in-session menu. --- .../java/com/steamdeck/launcher/SessionActivity.kt | 9 +++++++-- .../com/steamdeck/launcher/session/SessionPrefs.kt | 12 ++++++++++-- .../com/steamdeck/launcher/ui/ModeSettingsDialog.kt | 4 ++-- .../java/com/steamdeck/launcher/ui/SessionOverlay.kt | 2 +- 4 files changed, 20 insertions(+), 7 deletions(-) diff --git a/app/src/main/java/com/steamdeck/launcher/SessionActivity.kt b/app/src/main/java/com/steamdeck/launcher/SessionActivity.kt index eea0110f98..bf8af866a4 100644 --- a/app/src/main/java/com/steamdeck/launcher/SessionActivity.kt +++ b/app/src/main/java/com/steamdeck/launcher/SessionActivity.kt @@ -444,8 +444,13 @@ class SessionActivity : ComponentActivity(), SurfaceHolder.Callback { // 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, unless the user pinned 16:9 for a foldable, and the // compositor letterboxes onto a squarer panel. - val aspect = if (SessionPrefs.shapeMode(this) == SessionPrefs.SHAPE_WIDE) 16f / 9f - else maxOf(panelW / panelH, 16f / 9f) + // "Exactly this panel" drops that floor, for a 4:3 or 3:2 handheld whose games should + // fill it. + val aspect = when (SessionPrefs.shapeMode(this)) { + SessionPrefs.SHAPE_WIDE -> 16f / 9f + SessionPrefs.SHAPE_EXACT -> panelW / panelH + else -> maxOf(panelW / panelH, 16f / 9f) + } // 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 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 bb9191790f..d04fdc2251 100644 --- a/app/src/main/java/com/steamdeck/launcher/session/SessionPrefs.kt +++ b/app/src/main/java/com/steamdeck/launcher/session/SessionPrefs.kt @@ -35,10 +35,18 @@ object SessionPrefs { const val SHAPE_AUTO = "auto" const val SHAPE_WIDE = "16:9" + const val SHAPE_EXACT = "exact" + + /** The choices the settings offer, in order. */ + val shapeChoices = listOf( + SHAPE_AUTO to "The panel's shape (16:9 or wider)", + SHAPE_EXACT to "Exactly this panel (4:3, 3:2…)", + SHAPE_WIDE to "16:9 with bars", + ) /** - * The shape of the display the session presents: the panel's own (never narrower than 16:9) - * or a fixed 16:9. A foldable defaults to 16:9, which sits with modest bars on either of its + * The shape of the display the session presents: the panel's own (never narrower than 16:9), + * exactly the panel's (a 4:3 or 3:2 handheld, drawn edge to edge), or a fixed 16:9. A foldable defaults to 16:9, which sits with modest bars on either of its * panels; the panel's own shape would fit one and leave a strip on the other, and gamescope's * display cannot change size once the session is up. */ 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 9f486328ef..0aa6e0786e 100644 --- a/app/src/main/java/com/steamdeck/launcher/ui/ModeSettingsDialog.kt +++ b/app/src/main/java/com/steamdeck/launcher/ui/ModeSettingsDialog.kt @@ -96,8 +96,8 @@ fun ModeSettingsPage(s: ModeSettings, a: ModeSettingsActions) { onPick = a.onResolution, ) ChoiceRow( - host, "shape", "Shape", "Adds bars to preserve 16:9.", - listOf("auto" to "The panel's shape", "16:9" to "16:9 with bars"), s.shapeMode, onPick = a.onShape, + host, "shape", "Shape", "The panel's shape stays at 16:9 or wider; pick Exactly this panel for a 4:3 or 3:2 screen.", + com.steamdeck.launcher.session.SessionPrefs.shapeChoices, s.shapeMode, onPick = a.onShape, ) } SettingsGroup("HDR") { diff --git a/app/src/main/java/com/steamdeck/launcher/ui/SessionOverlay.kt b/app/src/main/java/com/steamdeck/launcher/ui/SessionOverlay.kt index d4adfc9123..8c1eadd7d1 100644 --- a/app/src/main/java/com/steamdeck/launcher/ui/SessionOverlay.kt +++ b/app/src/main/java/com/steamdeck/launcher/ui/SessionOverlay.kt @@ -261,7 +261,7 @@ fun SessionDrawer(open: Boolean, a: DrawerActions) { SettingsGroup("Next session") { ChoiceRow( host, "shape", "Display shape", null, - listOf(SessionPrefs.SHAPE_AUTO to "The panel's shape", SessionPrefs.SHAPE_WIDE to "16:9 with bars"), a.shapeMode, onPick = a.onShape, + SessionPrefs.shapeChoices, a.shapeMode, onPick = a.onShape, ) if (a.steam) ChoiceRow( host, "fex", "FEX preset", null,