]> git.ipfire.org Git - thirdparty/plymouth.git/commitdiff
libply: fix HiDPI detection
authorMichael Kuhn <suraia@ikkoku.de>
Mon, 22 Aug 2016 19:54:52 +0000 (21:54 +0200)
committerRay Strode <rstrode@redhat.com>
Tue, 23 Aug 2016 13:58:59 +0000 (09:58 -0400)
The check would erroneously turn off HiDPI mode for devices with a
resolution less than 4K.

https://bugs.freedesktop.org/show_bug.cgi?id=97424

src/libply/ply-utils.c

index 31b642eb29626be6a5197ac04f4d2152f476245c..239c365dc624676abc9092385839be44141a5555 100644 (file)
@@ -963,8 +963,6 @@ out:
 /* The minimum resolution at which we turn on a device-scale of 2 */
 #define HIDPI_LIMIT 192
 #define HIDPI_MIN_HEIGHT 1200
-/* From http://en.wikipedia.org/wiki/4K_resolution#Resolutions_of_common_formats */
-#define SMALLEST_4K_WIDTH 3656
 
 int
 ply_get_device_scale (uint32_t width,
@@ -981,9 +979,6 @@ ply_get_device_scale (uint32_t width,
         if ((force_device_scale = getenv ("PLYMOUTH_FORCE_SCALE")))
                 return strtoul (force_device_scale, NULL, 0);
 
-        if (width >= SMALLEST_4K_WIDTH)
-                return 1;
-
         if (height < HIDPI_MIN_HEIGHT)
                 return 1;