mirror of
https://github.com/Droid-Deck/DroidDeck.git
synced 2026-11-24 23:36:04 +00:00
fix(input): keep Steam grips on a small portrait pad and fit the bottom row
This commit is contained in:
1 parent
6f564caba6
commit
318d64f3d6
3 files changed
+28
-10
No files matched your search
@@ -248,4 +248,17 @@ class KitLayoutTest {
|
||||
assertEquals(kit.toString(), !kit.steam, InputControl.RS in placed)
|
||||
}
|
||||
}
|
||||
|
||||
@Test fun aSmallerPortraitPadKeepsTheGripsAndANarrowBottomRowNeverOverlaps() {
|
||||
val grips = setOf("legacy:l4", "legacy:l5", "legacy:r4", "legacy:r5")
|
||||
for (scale in listOf(.8f, 1f)) {
|
||||
val ids = KitLayout.elements(context, PadKit.STEAM_DECK, 720, 1280, scale = scale).map { it.id }
|
||||
assertTrue("$scale", ids.containsAll(grips))
|
||||
}
|
||||
for (kit in PadKit.entries) {
|
||||
val (w, h) = 720 to 1280
|
||||
val elements = KitLayout.elements(context, kit, w, h, Rect(120, 0, 0, 0))
|
||||
assertEquals(kit.toString(), emptyList<Pair<String, String>>(), overlapping(elements, w, h))
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user