mirror of
https://github.com/Droid-Deck/DroidDeck.git
synced 2026-11-21 22:05:59 +00:00
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.
This commit is contained in:
1 parent
d2ea9b898a
commit
18364845ad
6 files changed
+43
-2
No files matched your search
@@ -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()
|
||||
|
||||
Reference in new issue
Block a user