]> git.ipfire.org Git - thirdparty/plymouth.git/commitdiff
ply-utils: Only choose scale 2 when the perfect scale would be >= 1.75
authorDaniel van Vugt <daniel.van.vugt@canonical.com>
Tue, 5 Mar 2024 09:51:11 +0000 (17:51 +0800)
committerDaniel van Vugt <daniel.van.vugt@canonical.com>
Tue, 5 Mar 2024 09:51:11 +0000 (17:51 +0800)
This is the intended design documented in:
https://gitlab.gnome.org/GNOME/mutter/-/commit/d03dce43786d

And discussed in:
https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/3616

src/libply/ply-utils.c

index ad816f14a831898ad0848fc2499c50ac1bb87285..44a930994a461831863a932e36789520494fa046 100644 (file)
@@ -1057,7 +1057,7 @@ get_device_scale (uint32_t width,
         target_dpi = (diag_inches >= 20.f) ? 110 : 135;
 
         perfect_scale = physical_dpi / target_dpi;
-        device_scale = (perfect_scale > 1.5f) ? 2 : 1;
+        device_scale = (perfect_scale >= 1.75f) ? 2 : 1;
 
         return device_scale;
 }