mirror of
https://gitlab.freedesktop.org/emersion/libdisplay-info.git
synced 2024-12-24 21:58:59 +01:00
di-edid-decode: add special case for 16:10 aspect ratio
The mathematical aspect ratio is 8:5 but people use 16:10. Signed-off-by: Simon Ser <contact@emersion.fr>
This commit is contained in:
parent
a001cab480
commit
4d18413c28
2 changed files with 16 additions and 0 deletions
|
@ -114,6 +114,11 @@ compute_aspect_ratio(int width, int height, int *horiz_ratio, int *vert_ratio)
|
|||
*horiz_ratio = width / d;
|
||||
*vert_ratio = height / d;
|
||||
}
|
||||
|
||||
if (*horiz_ratio == 8 && *vert_ratio == 5) {
|
||||
*horiz_ratio = 16;
|
||||
*vert_ratio = 10;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
11
test/data/dell-2408wfp-dp.diff
Normal file
11
test/data/dell-2408wfp-dp.diff
Normal file
|
@ -0,0 +1,11 @@
|
|||
--- ref
|
||||
+++ di
|
||||
@@ -33,7 +33,7 @@
|
||||
DMT 0x33: 1600x1200 60.000000 Hz 4:3 75.000 kHz 162.000000 MHz
|
||||
DMT 0x15: 1152x864 75.000000 Hz 4:3 67.500 kHz 108.000000 MHz
|
||||
Detailed Timing Descriptors:
|
||||
- DTD 1: 1920x1200 59.950171 Hz 8:5 74.038 kHz 154.000000 MHz (519 mm x 320 mm)
|
||||
+ DTD 1: 1920x1200 59.950171 Hz 16:10 74.038 kHz 154.000000 MHz (519 mm x 320 mm)
|
||||
Hfront 48 Hsync 32 Hback 80 Hpol P
|
||||
Vfront 3 Vsync 6 Vback 26 Vpol N
|
||||
Display Product Serial Number: 'G283H8BI21MS'
|
Loading…
Reference in a new issue