]> git.ipfire.org Git - thirdparty/plymouth.git/commit
ply-utils: Adjust HiDPI cut-off value to 1.625f
authorJanne Grunau <j@jannau.net>
Sat, 17 May 2025 16:20:30 +0000 (18:20 +0200)
committerHans de Goede <hansg@kernel.org>
Thu, 3 Jul 2025 13:04:17 +0000 (15:04 +0200)
commit7e3b8330c9a8497dde3d6b1d73cf327a901ce573
tree8cc78a72b79282839359583cfc6231132d2f2290
parent38f7ff25b87dd283b7ee05fa1f9413588e712471
ply-utils: Adjust HiDPI cut-off value to 1.625f

This matches mutter's behaviour before
https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/3616 was merged.
It first rounded to the newest fractional scale factor (in 0.25 steps)
and then rounded N.25 and N.5 down to N and N.75 up to N+1.

Commit 3b8e9184 ("ply-utils: Only choose scale 2 when the perfect scale
would be >= 1.75") interprets the mentioned difference of at most 0.25
for rounding up very literal. A differnt ionterpretation of
https://github.com/GNOME/mutter/commit/d03dce43786ddfaca86a0ec006264c1b0dfd74d9
intend is that it's desireable to round N.5 down.

This change has unexpected side effect of using a device scale of 1 for
most of Apple's Retina displays in Macbooks (221 - 227 DPI). Raised as
https://gitlab.gnome.org/GNOME/mutter/-/issues/4110 in mutter.

Using 1.75f cut-off value requires a pixel density of 236.25 for HiDPI
while 1.625f requires only 219.375 DPI.

Mutter use the same calculation with
https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/4490 merged.

Signed-off-by: Janne Grunau <j@jannau.net>
src/libply/ply-utils.c