mirror of
https://github.com/Droid-Deck/DroidDeck.git
synced 2026-11-19 12:56:06 +00:00
revert(hud): redraw the FPS graph every game frame outside Strip (#2857)
revert(hud): redraw the FPS graph every game frame outside Strip (#2843)
This commit is contained in:
1 parent
5b7409d1d5
commit
b43724e5f3
1 file changed
+6
-4
@@ -290,9 +290,11 @@ class DroidDeckHudView(context: Context) : View(context) {
|
||||
periodDone.trySend(Unit)
|
||||
}
|
||||
if (graphRect == null) return
|
||||
val now = SystemClock.uptimeMillis()
|
||||
if (now - lastGraphDrawMs < GRAPH_REDRAW_MS) return
|
||||
lastGraphDrawMs = now
|
||||
if (stripRect != null) {
|
||||
val now = SystemClock.uptimeMillis()
|
||||
if (now - lastGraphDrawMs < STRIP_GRAPH_REDRAW_MS) return
|
||||
lastGraphDrawMs = now
|
||||
}
|
||||
invalidate()
|
||||
}
|
||||
|
||||
@@ -1265,7 +1267,7 @@ class DroidDeckHudView(context: Context) : View(context) {
|
||||
const val TAB_PAD_X_SP = 7f
|
||||
const val TAB_PAD_Y_SP = 5.5f
|
||||
const val REFRESH_MS = 500L
|
||||
const val GRAPH_REDRAW_MS = 66L
|
||||
const val STRIP_GRAPH_REDRAW_MS = 66L
|
||||
private const val HUE_IDLE_MS = 500L
|
||||
const val MIN_SCALE = 0.5f
|
||||
const val MAX_SCALE = 2f
|
||||
|
||||
Reference in new issue
Block a user