Merge branch 'main' into fix/mangoapp-drm-listing

This commit is contained in:
Kurt Himebauch authored and GitHub committed 2026-10-01 14:31:23 -04:00
commit 0d21e2f913
8 files changed
+45 -9

No files matched your search

@@ -21,8 +21,9 @@ import java.util.concurrent.atomic.AtomicInteger
* is on, what the screen is actually being shown - "60 → 118 fps" is the proof that the engine
* is doing something, and "FG starting" or a reason is the proof that it is not.
*
* The base rate is counted here from the compositor's per-frame callback, so it is right with or
* without an engine. The presented rate comes from the engine's own telemetry while it generates.
* The base rate is the game window's own frames, counted here from the compositor's per-frame
* callback with or without an engine - what Steam's overlay counts too. The presented rate comes
* from the engine's telemetry while it generates.
*/
class PerfHud(context: Context) {
/** Empty when the HUD is off or not yet started. */
@@ -99,10 +100,7 @@ class PerfHud(context: Context) {
return when {
problem == 1 -> context.getString(R.string.hud_fg_unsupported, name)
problem == 2 -> context.getString(R.string.hud_fg_failed, name)
stats != null && stats[3] > 1f -> {
val source = if (stats[2] > 1f) stats[2] else base
String.format(Locale.US, "%s %.0f → %.0f fps", label, source, stats[3])
}
stats != null && stats[3] > 1f -> String.format(Locale.US, "%s %.0f → %.0f fps", label, base, stats[3])
else -> context.getString(R.string.hud_fg_starting, label, fps(base))
}
}
@@ -184,6 +184,12 @@ object SessionPrefs {
writeForceFullscreenFlag(context)
}
fun stretch16x9(context: Context): Boolean = prefs(context).getBoolean("stretch16x9", false)
fun setStretch16x9(context: Context, on: Boolean) {
prefs(context).edit().putBoolean("stretch16x9", on).apply()
}
/**
* The same choice as a file the running session watches, so the drawer can change it live:
* the session hands every change to gamescope, which reads GAMESCOPE_FORCE_WINDOWS_FULLSCREEN
@@ -540,6 +540,7 @@ class SessionService : Service() {
if (steamHere) guest.add("BL_STEAM_CHANNEL=" + SessionPrefs.steamChannel(this))
if (SessionState.mode == MODE_STEAM) {
guest.add("BL_GAMESCOPE_FORCE_FULLSCREEN=" + (if (SessionPrefs.forceFullscreen(this)) "1" else "0"))
guest.add("BL_GAMESCOPE_STRETCH_16X9=" + (if (SessionPrefs.stretch16x9(this)) "1" else "0"))
SessionPrefs.writeForceFullscreenFlag(this)
}
// Proton's own gate for its xalia helper (its `proton` script reads this, and sets