diff --git a/app/src/main/java/com/steamdeck/launcher/SessionActivity.kt b/app/src/main/java/com/steamdeck/launcher/SessionActivity.kt index 50e0ea9f1e..ef5133d9ca 100644 --- a/app/src/main/java/com/steamdeck/launcher/SessionActivity.kt +++ b/app/src/main/java/com/steamdeck/launcher/SessionActivity.kt @@ -200,9 +200,13 @@ class SessionActivity : ComponentActivity(), SurfaceHolder.Callback { val turnip = TurnipDriver(this) val driverId = if (CompositorHost.isStarted) null else turnip.install() - val size = outputSize() + // The output size belongs to the session, not to the Surface: gamescope's display is + // sized once when the session starts and cannot change. A foldable recreates the Surface + // on the other panel, and recomputing the size there told the compositor a 21:9 buffer + // was 16:9 — the picture came back squashed sideways. While a session runs, keep its size. + val size = if (SessionState.running) SessionState.outputSize else outputSize() SessionState.outputSize = size - SessionState.refreshHz = refreshHz() + if (!SessionState.running) SessionState.refreshHz = refreshHz() // Letterbox, never stretch or crop: the output can be a different shape from the panel, // and a game's picture must keep its proportions with bars, not lose its edges. WaylandCompositor.nativeSetScaleMode(SCALE_FIT, ALIGN_CENTER) diff --git a/app/src/main/java/com/steamdeck/launcher/ui/MainScreen.kt b/app/src/main/java/com/steamdeck/launcher/ui/MainScreen.kt index 38e7929dde..00dc0faa17 100644 --- a/app/src/main/java/com/steamdeck/launcher/ui/MainScreen.kt +++ b/app/src/main/java/com/steamdeck/launcher/ui/MainScreen.kt @@ -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)