mirror of
https://github.com/Droid-Deck/DroidDeck.git
synced 2026-11-19 21:06:09 +00:00
Keep the session's output size across a Surface recreation
gamescope's display is sized once when the session starts and cannot change, but the size was recomputed on every surfaceCreated. A foldable recreates the Surface on the other panel, so a session started on the 21:9 outer screen and opened onto the square inner one told the compositor its 21:9 buffer was 16:9 and the picture came back squashed sideways. While a session runs its size is kept; the compositor letterboxes it onto whatever panel is current. Also the Compose build: BoxWithConstraints' maxWidth read outside its scope.
This commit is contained in:
1 parent
aa7c71bfb6
commit
3877d0696f
2 files changed
+8
-3
No files matched your search
@@ -61,6 +61,7 @@ fun MainScreen(
|
||||
.background(MaterialTheme.colorScheme.background),
|
||||
contentAlignment = Alignment.TopCenter,
|
||||
) {
|
||||
val wide = maxWidth > 600.dp
|
||||
Column(
|
||||
horizontalAlignment = Alignment.CenterHorizontally,
|
||||
modifier = Modifier
|
||||
@@ -76,7 +77,7 @@ fun MainScreen(
|
||||
Image(
|
||||
painter = painterResource(R.drawable.logo),
|
||||
contentDescription = null,
|
||||
modifier = Modifier.size(if (maxWidth > 600.dp) 88.dp else 72.dp),
|
||||
modifier = Modifier.size(if (wide) 88.dp else 72.dp),
|
||||
)
|
||||
Spacer(Modifier.height(8.dp))
|
||||
Text("SteamDeck", style = MaterialTheme.typography.headlineSmall, color = MaterialTheme.colorScheme.onBackground)
|
||||
|
||||
Reference in new issue
Block a user