fix(session): let the portrait custom resolution dialog accept tall sizes

This commit is contained in:
FX192 committed 2026-11-21 22:56:29 +03:00
1 parent a9054aac3f
commit 567181d05f
4 files changed
+13 -4

No files matched your search

@@ -65,6 +65,15 @@ class PortraitResolutionTest {
SessionPrefs.displayMode(app, SessionService.MODE_RUN, com.droiddeck.launcher.runtime.UserApps.SCRIPT_LAUNCHER))
}
@Test fun portraitInputAcceptsTallSizesLandscapeInputDoesNot() {
assertNull(SessionPrefs.parseResolution("1440x2560"))
assertEquals(1440 to 2560, SessionPrefs.parseOrientedResolution("1440x2560"))
assertEquals(1280 to 720, SessionPrefs.parseOrientedResolution("1280x720"))
assertNull(SessionPrefs.parseOrientedResolution("100x100"))
SessionPrefs.setResolutionChoice(app, "steam", "1440x2560", portrait = true)
assertEquals("1440x2560", SessionPrefs.resolutionStored(app, "steam", panel, true))
}
@Test fun modesKeepSeparateChoices() {
SessionPrefs.setResolutionChoice(app, "steam", "1080p", portrait = true)
assertEquals(SessionDisplay.LINK_LANDSCAPE, SessionPrefs.resolutionStored(app, "lxqt", panel, true))