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

@@ -0,0 +1,33 @@
package com.droiddeck.launcher.ui
import org.junit.Assert.assertEquals
import org.junit.Test
class HistoryTest {
@Test fun theSpanIsTheTimeTheKeptReadingsCover() {
val h = History(3)
h.add(1f, 1_000L)
h.add(2f, 1_500L)
assertEquals(1, h.spanSeconds())
h.add(3f, 2_000L)
h.add(4f, 4_000L)
assertEquals(listOf(2f, 3f, 4f), h.snapshot())
assertEquals(3, h.spanSeconds())
}
@Test fun aHistoryThatStopsBeingFedKeepsItsSpan() {
val h = History(4)
h.add(1f, 10_000L)
h.add(2f, 20_000L)
assertEquals(10, h.spanSeconds())
assertEquals(10, h.spanSeconds())
}
@Test fun readingsWithoutATimeHaveNoSpan() {
val h = History(2)
h.add(1f)
assertEquals(0, h.spanSeconds())
assertEquals(0, History(2).spanSeconds())
assertEquals(0, History(2).apply { add(1f, 5_000L) }.spanSeconds())
}
}
@@ -0,0 +1,26 @@
package com.droiddeck.launcher.ui
import org.junit.Assert.assertArrayEquals
import org.junit.Test
class StripFitTest {
@Test fun everythingFitsOnAWideLine() {
assertArrayEquals(booleanArrayOf(true, true, true), fitByPriority(intArrayOf(10, 20, 30), intArrayOf(0, 1, 2), 5, 100))
}
@Test fun theLeastImportantItemsAreLeftOutFirst() {
assertArrayEquals(booleanArrayOf(true, false, true), fitByPriority(intArrayOf(10, 20, 30), intArrayOf(0, 2, 1), 5, 60))
}
@Test fun anItemThatDoesNotFitEndsTheLine() {
assertArrayEquals(booleanArrayOf(true, false, false), fitByPriority(intArrayOf(10, 50, 5), intArrayOf(0, 1, 2), 2, 40))
}
@Test fun equalPrioritiesKeepTheirOrder() {
assertArrayEquals(booleanArrayOf(true, true, false), fitByPriority(intArrayOf(10, 10, 10), intArrayOf(0, 0, 0), 0, 25))
}
@Test fun nothingFitsInNoRoom() {
assertArrayEquals(booleanArrayOf(false, false), fitByPriority(intArrayOf(10, 10), intArrayOf(0, 1), 0, 5))
}
}