Accepting request 977039 from home:qzhao:branches:Base:System
plymouth-screen-twice-scale-on-160DPI-higher.patch: When screen DPI > 160, display will scale output twice (boo#1183425 boo#1184309). OBS-URL: https://build.opensuse.org/request/show/977039 OBS-URL: https://build.opensuse.org/package/show/Base:System/plymouth?expand=0&rev=320
This commit is contained in:
parent
d695ad46ec
commit
4156a850ef
53
plymouth-screen-twice-scale-on-160DPI-higher.patch
Normal file
53
plymouth-screen-twice-scale-on-160DPI-higher.patch
Normal file
@ -0,0 +1,53 @@
|
|||||||
|
diff -Nura plymouth-0.9.5~git20220412.e960111/src/libply/ply-utils.c plymouth-0.9.5~git20220412.e960111_new/src/libply/ply-utils.c
|
||||||
|
--- plymouth-0.9.5~git20220412.e960111/src/libply/ply-utils.c 2022-04-15 16:39:24.000000000 +0800
|
||||||
|
+++ plymouth-0.9.5~git20220412.e960111_new/src/libply/ply-utils.c 2022-05-13 18:34:30.249211696 +0800
|
||||||
|
@@ -861,7 +861,7 @@
|
||||||
|
}
|
||||||
|
|
||||||
|
/* The minimum resolution at which we turn on a device-scale of 2 */
|
||||||
|
-#define HIDPI_LIMIT 192
|
||||||
|
+#define HIDPI_TWICE_LIMIT 160
|
||||||
|
#define HIDPI_MIN_HEIGHT 1200
|
||||||
|
|
||||||
|
int
|
||||||
|
@@ -873,8 +873,20 @@
|
||||||
|
int device_scale;
|
||||||
|
double dpi_x, dpi_y;
|
||||||
|
const char *force_device_scale;
|
||||||
|
-
|
||||||
|
device_scale = 1;
|
||||||
|
+ #define WIDTH_INCHS (width_mm / 25.4)
|
||||||
|
+ #define HEIGHT_INCHS (height_mm / 25.4)
|
||||||
|
+
|
||||||
|
+ if (width > 0 && height > 0 && width_mm > 0 && height_mm > 0) {
|
||||||
|
+ ply_trace("screen width is %d mm", width_mm);
|
||||||
|
+ ply_trace("screen height is %d mm", height_mm);
|
||||||
|
+ ply_trace("screen width pixels is %d.", width);
|
||||||
|
+ ply_trace("screen height pixels is %d.", height);
|
||||||
|
+ dpi_x = (double)width / WIDTH_INCHS;
|
||||||
|
+ ply_trace("screen width DPI is %lf", dpi_x);
|
||||||
|
+ dpi_y = (double)height / HEIGHT_INCHS;
|
||||||
|
+ ply_trace("screen height DPI is %lf", dpi_y);
|
||||||
|
+ }
|
||||||
|
|
||||||
|
if ((force_device_scale = getenv ("PLYMOUTH_FORCE_SCALE")))
|
||||||
|
return strtoul (force_device_scale, NULL, 0);
|
||||||
|
@@ -893,14 +905,10 @@
|
||||||
|
(width_mm == 16 && height_mm == 10))
|
||||||
|
return 1;
|
||||||
|
|
||||||
|
- if (width_mm > 0 && height_mm > 0) {
|
||||||
|
- dpi_x = (double)width / (width_mm / 25.4);
|
||||||
|
- dpi_y = (double)height / (height_mm / 25.4);
|
||||||
|
- /* We don't completely trust these values so both
|
||||||
|
- must be high, and never pick higher ratio than
|
||||||
|
- 2 automatically */
|
||||||
|
- if (dpi_x > HIDPI_LIMIT && dpi_y > HIDPI_LIMIT)
|
||||||
|
- device_scale = 2;
|
||||||
|
+ if (dpi_x > HIDPI_TWICE_LIMIT && dpi_y > HIDPI_TWICE_LIMIT)
|
||||||
|
+ {
|
||||||
|
+ device_scale = 2;
|
||||||
|
+ ply_trace("When DPI > 160, screen will scale output twice as community want.");
|
||||||
|
}
|
||||||
|
|
||||||
|
return device_scale;
|
@ -1,3 +1,10 @@
|
|||||||
|
-------------------------------------------------------------------
|
||||||
|
Fri May 13 10:45:07 UTC 2022 - Cliff Zhao <qzhao@suse.com>
|
||||||
|
|
||||||
|
- plymouth-screen-twice-scale-on-160DPI-higher.patch:
|
||||||
|
When screen DPI > 160, display will scale output twice
|
||||||
|
(boo#1183425 boo#1184309).
|
||||||
|
|
||||||
-------------------------------------------------------------------
|
-------------------------------------------------------------------
|
||||||
Mon May 9 06:15:39 UTC 2022 - Cliff Zhao <qzhao@suse.com>
|
Mon May 9 06:15:39 UTC 2022 - Cliff Zhao <qzhao@suse.com>
|
||||||
|
|
||||||
|
@ -44,8 +44,10 @@ Patch4: plymouth-only_use_fb_for_cirrus_bochs.patch
|
|||||||
Patch5: plymouth-keep-KillMode-none.patch
|
Patch5: plymouth-keep-KillMode-none.patch
|
||||||
# PATCH-FIX-OPENSUSE plymouth-install-label-library-and-font-file-to-initrd.patch boo#1183425 boo#1184309 qzhao@suse.com -- Pack label plugin and font into initram to ensure notice info could successfully show when partition encrypted.
|
# PATCH-FIX-OPENSUSE plymouth-install-label-library-and-font-file-to-initrd.patch boo#1183425 boo#1184309 qzhao@suse.com -- Pack label plugin and font into initram to ensure notice info could successfully show when partition encrypted.
|
||||||
Patch6: plymouth-install-label-library-and-font-file-to-initrd.patch
|
Patch6: plymouth-install-label-library-and-font-file-to-initrd.patch
|
||||||
|
# PATCH-FIX-OPENSUSE plymouth-screen-twice-scale-on-160DPI-higher.patch boo#1183425 boo#1184309 qzhao@suse.com -- When DPI > 160, screen will scale output twice.
|
||||||
|
Patch7: plymouth-screen-twice-scale-on-160DPI-higher.patch
|
||||||
# PATCH-FIX-OPENSUSE plymouth-quiet-dracut-build-info.patch bsc#1189613 qzhao@suse.com -- Hide unuseful output when re-generate initrd.
|
# PATCH-FIX-OPENSUSE plymouth-quiet-dracut-build-info.patch bsc#1189613 qzhao@suse.com -- Hide unuseful output when re-generate initrd.
|
||||||
Patch7: plymouth-quiet-dracut-build-info.patch
|
Patch8: plymouth-quiet-dracut-build-info.patch
|
||||||
# PATCH-FIX-OPENSUSE plymouth-watermark-config.patch bsc#1189613 qzhao@suse.com -- Add two-step water mark config support.
|
# PATCH-FIX-OPENSUSE plymouth-watermark-config.patch bsc#1189613 qzhao@suse.com -- Add two-step water mark config support.
|
||||||
Patch9: plymouth-watermark-config.patch
|
Patch9: plymouth-watermark-config.patch
|
||||||
# PATCH-FIX-OPENSUSE plymouth-log-on-default.patch bsc#1193736 qzhao@suse.com -- Enable plymouth log by default, help to resolve random appear problems.
|
# PATCH-FIX-OPENSUSE plymouth-log-on-default.patch bsc#1193736 qzhao@suse.com -- Enable plymouth log by default, help to resolve random appear problems.
|
||||||
|
Loading…
Reference in New Issue
Block a user