fix(hud): see the Steam session's mangoapp config when deciding whether the HUD is shown

Steam sessions point mangoapp at /tmp/droiddeck-mangohud.conf, so
OverlayShown never saw the overlay and the GPU clock stayed at 0 MHz.
This commit is contained in:
angelrenefm committed 2026-11-04 00:04:30 +01:00
1 parent f3650d3d37
commit 7901e76561
2 files changed
+42 -1

No files matched your search

@@ -4,7 +4,7 @@ import java.io.File
object OverlayShown {
fun check(root: File): Boolean {
val config = File(root, "tmp").listFiles { f -> f.name.startsWith("mangohud.") }
val config = File(root, "tmp").listFiles { f -> f.name.startsWith("mangohud.") || f.name == "droiddeck-mangohud.conf" }
?.maxByOrNull { it.lastModified() } ?: return false
return runCatching { !config.readText().contains("no_display") }.getOrDefault(false)
}