mirror of
https://github.com/Droid-Deck/DroidDeck.git
synced 2026-11-19 12:56:06 +00:00
fix: Steam's UI draws at an even share of the refresh near 60 fps instead of the panel's full rate (lag and heat since 0.6.7) (#1809)
This commit is contained in:
1 parent
b0a8c2065d
commit
f69e2d0171
9 files changed
+92
-12
No files matched your search
@@ -1094,6 +1094,15 @@ object SessionPrefs {
|
||||
fun compositorFpsLimit(mirrorRefreshLimit: Int): Int =
|
||||
if (mirrorRefreshLimit <= 0) FPS_UNPACED else mirrorRefreshLimit
|
||||
|
||||
private const val STEAM_UI_FPS = 60f
|
||||
|
||||
fun steamUiPacing(context: Context): Boolean = prefs(context).getBoolean("steamUiPacing", true)
|
||||
|
||||
fun steamUiFpsLimit(refreshHz: Float): Int {
|
||||
val steps = ((refreshHz + 0.5f) / STEAM_UI_FPS).toInt()
|
||||
return if (steps < 2) 0 else (refreshHz / steps + 0.01f).toInt()
|
||||
}
|
||||
|
||||
val upscalerChoices = listOf(
|
||||
0 to "Linear", 2 to "Nearest", 4 to "AMD FSR 1", 3 to "Snapdragon GSR",
|
||||
8 to "Snapdragon GSR (quality)", 7 to "NVIDIA NIS", 6 to "Sharpen only",
|
||||
|
||||
@@ -535,10 +535,6 @@ class SessionService : Service() {
|
||||
// gamescope's WSI layer and winex11 reuse their per-present window checks for this long.
|
||||
guest.add("DROIDDECK_WSI_BYPASS_CHECK_MS=100")
|
||||
guest.add("WINE_OFFSCREEN_CHECK_MS=100")
|
||||
// gamescope turns buffers around slower than an uncapped game draws; more images keep it drawing.
|
||||
// The WSI layer goes back to its default count while Steam's Frame Limit holds the game.
|
||||
guest.add("GAMESCOPE_WSI_MIN_IMAGE_COUNT=8")
|
||||
guest.add("GAMESCOPE_WSI_ENSURE_MIN_IMAGE_COUNT=1")
|
||||
guest.add("BL_REFRESH=" + Math.round(SessionState.refreshHz))
|
||||
guest.add("BL_LOG=" + sessionLog.path)
|
||||
guest.add("BL_DEBUG_DIR=" + sessionDir.path)
|
||||
|
||||
Reference in new issue
Block a user