Skip to content

Fix HiDPI mode filtering for portrait displays - #24

Merged
didriksg merged 1 commit into
didriksg:mainfrom
shaw-baobao:fix/portrait-hidpi-modes
Aug 5, 2026
Merged

Fix HiDPI mode filtering for portrait displays#24
didriksg merged 1 commit into
didriksg:mainfrom
shaw-baobao:fix/portrait-hidpi-modes

Conversation

@shaw-baobao

Copy link
Copy Markdown
Contributor

What & why

Rotated portrait displays could lose their usable HiDPI modes because the native aspect ratio was inferred from the largest backing buffer, which could belong to a landscape HiDPI mode. The resolution menu also used landscape-only minimum dimensions.

This change:

  • derives the panel aspect from its largest unscaled timing before falling back to scaled modes;
  • applies orientation-independent minimum dimensions;
  • keeps opposite-orientation modes out of the resolution menu and smooth-scaling slider;
  • adds focused geometry regression tests and a make test entry point.

How tested

  • make test — 3 tests passed
  • make compile
  • ./scripts/release.sh v0.0.0-ci — universal arm64 + x86_64 DMG built
  • Physical 90° external display: 12 eligible portrait HiDPI modes enumerated; switched from 1440×2560 to 1080×1920 with a 2160×3840 backing buffer, then restored the original mode

Checklist

  • Builds locally (./dev.sh, or ./scripts/release.sh v0.0.0-ci for the full release build)
  • Added/updated Crisp/Resources/Localizable.xcstrings for any new user-facing strings (N/A: no new strings)
  • Screenshot or short clip for any UI change (N/A: no visual or layout change)

@didriksg

didriksg commented Aug 5, 2026

Copy link
Copy Markdown
Owner

Hardware-verified on a physically rotated Dell U2412M (1200x1920 portrait) alongside an AOC Q27G3XMN (2560x1440 landscape) and the built-in display:

  • Before: the Dell's Resolution section showed "No display modes available".
  • After: portrait modes are listed (1200x1920 default, 1000x1600 / 840x1344 / 800x1280 in both HiDPI and non-HiDPI groups), and mode switching works.
  • No regression on the landscape AOC or the built-in display.

Thanks for the fix!

@didriksg
didriksg merged commit bf4aa48 into didriksg:main Aug 5, 2026
1 check passed
@didriksg didriksg mentioned this pull request Aug 9, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants