mirror of
https://github.com/limine-bootloader/limine
synced 2024-11-23 17:09:40 +03:00
Handle if EDID returns resolution of 0 and update binary image
This commit is contained in:
parent
0a3f00f6e2
commit
7ae6781282
BIN
qloader2.bin
BIN
qloader2.bin
Binary file not shown.
@ -120,18 +120,20 @@ int init_vbe(uint64_t *framebuffer, uint16_t *pitch, uint16_t *target_width, uin
|
|||||||
|
|
||||||
struct edid_info_struct edid_info;
|
struct edid_info_struct edid_info;
|
||||||
if (!*target_width || !*target_height || !*target_bpp) {
|
if (!*target_width || !*target_height || !*target_bpp) {
|
||||||
*target_bpp = 32;
|
*target_width = 1024;
|
||||||
if (get_edid_info(&edid_info)) {
|
*target_height = 768;
|
||||||
print("vbe: EDID unavailable, defaulting to 1024x768\n");
|
*target_bpp = 32;
|
||||||
*target_width = 1024;
|
if (!get_edid_info(&edid_info)) {
|
||||||
*target_height = 768;
|
int edid_width = (int)edid_info.det_timing_desc1[2];
|
||||||
} else {
|
edid_width += ((int)edid_info.det_timing_desc1[4] & 0xf0) << 4;
|
||||||
*target_width = (int)edid_info.det_timing_desc1[2];
|
int edid_height = (int)edid_info.det_timing_desc1[5];
|
||||||
*target_width += ((int)edid_info.det_timing_desc1[4] & 0xf0) << 4;
|
edid_height += ((int)edid_info.det_timing_desc1[7] & 0xf0) << 4;
|
||||||
*target_height = (int)edid_info.det_timing_desc1[5];
|
if (edid_width && edid_height) {
|
||||||
*target_height += ((int)edid_info.det_timing_desc1[7] & 0xf0) << 4;
|
*target_width = edid_width;
|
||||||
print("vbe: EDID detected screen resolution of %ux%u\n",
|
*target_height = edid_height;
|
||||||
*target_width, *target_height);
|
print("vbe: EDID detected screen resolution of %ux%u\n",
|
||||||
|
*target_width, *target_height);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
print("vbe: Requested resolution of %ux%ux%u\n",
|
print("vbe: Requested resolution of %ux%ux%u\n",
|
||||||
|
Loading…
Reference in New Issue
Block a user