mirror of
https://github.com/Droid-Deck/DroidDeck.git
synced 2026-11-18 20:36:04 +00:00
fix: Steam's UI draws at an even share of the refresh near 60 fps instead of the panel's full rate (lag and heat since 0.6.7) (#1809)
This commit is contained in:
1 parent
b0a8c2065d
commit
f69e2d0171
9 files changed
+92
-12
No files matched your search
@@ -0,0 +1,22 @@
|
||||
package com.droiddeck.launcher.session
|
||||
|
||||
import org.junit.Assert.assertEquals
|
||||
import org.junit.Test
|
||||
|
||||
class SteamUiPacingTest {
|
||||
@Test fun aSixtyOrNinetyHertzScreenIsLeftUncapped() {
|
||||
assertEquals(0, SessionPrefs.steamUiFpsLimit(60f))
|
||||
assertEquals(0, SessionPrefs.steamUiFpsLimit(59.94f))
|
||||
assertEquals(0, SessionPrefs.steamUiFpsLimit(90f))
|
||||
}
|
||||
|
||||
@Test fun fasterScreensGetAnEvenDivisorOfTheirRefresh() {
|
||||
assertEquals(60, SessionPrefs.steamUiFpsLimit(120f))
|
||||
assertEquals(60, SessionPrefs.steamUiFpsLimit(119.99f))
|
||||
assertEquals(60, SessionPrefs.steamUiFpsLimit(120.00001f))
|
||||
assertEquals(72, SessionPrefs.steamUiFpsLimit(144.00002f))
|
||||
assertEquals(82, SessionPrefs.steamUiFpsLimit(165f))
|
||||
assertEquals(61, SessionPrefs.steamUiFpsLimit(185.00002f))
|
||||
assertEquals(60, SessionPrefs.steamUiFpsLimit(240f))
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user