mirror of
https://github.com/Droid-Deck/DroidDeck.git
synced 2026-11-18 20:36:04 +00:00
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:
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)
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user