From 64287eed217044a75a1a1c0c93639fab9583ba8a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=8E=E9=80=9A=E6=B4=B2?= Date: Sun, 24 Nov 2024 01:02:06 +0800 Subject: [PATCH] Display: change physical size detection to use basic display parameters Some monitor report invalid data in DTD. Ref: #1406 --- src/util/edidHelper.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/util/edidHelper.c b/src/util/edidHelper.c index 8cb7124a4..8c920bd30 100644 --- a/src/util/edidHelper.c +++ b/src/util/edidHelper.c @@ -65,8 +65,8 @@ bool ffEdidGetName(const uint8_t edid[128], FFstrbuf* name) void ffEdidGetPhysicalSize(const uint8_t edid[128], uint32_t* width, uint32_t* height) { - *width = (((uint32_t) edid[68] & 0xF0) << 4) + edid[66]; - *height = (((uint32_t) edid[68] & 0x0F) << 8) + edid[67]; + *width = edid[21] * 10; + *height = edid[22] * 10; } void ffEdidGetSerialAndManufactureDate(const uint8_t edid[128], uint32_t* serial, uint16_t* year, uint16_t* week)