* Only add the VESA modes if there is no EDID available.

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@42427 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
Axel Dörfler
2011-07-14 21:22:53 +00:00
parent f9b2ba2b84
commit d8c71f47c3
+13 -10
View File
@@ -76,17 +76,20 @@ create_mode_list(void)
const color_space kVesaSpaces[] = {B_RGB32_LITTLE, B_RGB24_LITTLE,
B_RGB16_LITTLE, B_RGB15_LITTLE, B_CMAP8};
// Create the initial list from the support mode list
// TODO: filter by monitor timing constraints!
display_mode* initialModes = (display_mode*)malloc(
sizeof(display_mode) * gInfo->shared_info->vesa_mode_count);
if (initialModes != NULL) {
vesa_mode* vesaModes = gInfo->vesa_modes;
// Create the initial list from the support mode list - but only if we don't
// have EDID info available, as that should be good enough.
display_mode* initialModes = NULL;
if (!gInfo->shared_info->has_edid) {
initialModes = (display_mode*)malloc(
sizeof(display_mode) * gInfo->shared_info->vesa_mode_count);
if (initialModes != NULL) {
vesa_mode* vesaModes = gInfo->vesa_modes;
for (uint32 i = gInfo->shared_info->vesa_mode_count; i-- > 0;) {
compute_display_timing(vesaModes[i].width, vesaModes[i].height, 60,
false, &initialModes[i].timing);
fill_display_mode(&initialModes[i]);
for (uint32 i = gInfo->shared_info->vesa_mode_count; i-- > 0;) {
compute_display_timing(vesaModes[i].width, vesaModes[i].height, 60,
false, &initialModes[i].timing);
fill_display_mode(&initialModes[i]);
}
}
}