feat(dual-screen): bottom-screen HUD, Line strip, strip under every bottom tab, Bottom screen HUD settings (#1982)

- In-game stats shows a bottom-screen HUD while no game sends dashboard data: 11 styles, tap to change; it reads the game's frames and the device itself, so it works with the top-screen HUD off.
- Line strip: one line like the top HUD's Strip (API + FPS, frame-time graph, 1 / 0.1 / 0.01 % lows, GPU, CPU with temperature, VRAM, RAM, clock); default strip above a game's dashboard; numbers that do not fit are left out by importance.
- The same strip under the tabs on every other bottom page during a session.
- Bottom screen HUD settings, shown even with the top HUD off: one switch for the whole bottom HUD, strip on every tab, and which numbers the Line strip shows.
- The bottom HUD redraws about 10 times a second (was about 3) and reads device stats twice a second.
- GPU load, clock and VRAM readers also run while the bottom HUD shows them (BottomHudPresence).
- Night style stays dim instead of flickering with the FPS.
- Review fixes: slow-frame ring 2048, tab strip redraw without gamescope frames, Proton name per game, Graphs' duration from the kept readings, Fahrenheit in Tiles, Rings and Cores.
This commit is contained in:
The412Banner authored and GitHub committed 2026-11-01 19:23:31 -05:00
1 parent 6a30a9bb4b
commit e1d241d723
22 files changed
+1393 -92

No files matched your search

@@ -68,6 +68,30 @@ class FrameStatsTest {
assertFalse(feed.poll(now + 1))
}
@Test fun slowFramesCountOnlyFramesOver33MsInTheWindow() {
val stats = FrameStats()
var now = 1_000_000_000L
for (ft in listOf(16_666_667L, 40_000_000L, 16_666_667L, 50_000_000L, 2_000_000_000L, 16_666_667L)) {
now += ft
stats.add(ft, now)
}
assertEquals(2, stats.slowFrames(now, 60_000_000_000L))
assertEquals(0, stats.slowFrames(now + 120_000_000_000L, 60_000_000_000L))
stats.reset()
assertEquals(0, stats.slowFrames(now, 60_000_000_000L))
}
@Test fun compositorFramesDoNotCountAsLiveGamescopeFrames() {
val feed = GameFrameFeed(java.io.File("/nonexistent/droiddeck-hud/frames"))
var now = 1_000_000_000L
assertFalse(feed.live)
feed.onCompositorFrame(now)
now += 16_666_667L
feed.onCompositorFrame(now)
feed.poll(now)
assertFalse(feed.live)
}
@Test fun aCompletedPeriodIsCountedWhenMangoHudWouldRedraw() {
val stats = FrameStats()
var now = 1_000_000_000L