From e146dee317eddc5a76108592c05e5e001293a838 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Axel=20D=C3=B6rfler?= Date: Sat, 29 Mar 2008 12:58:20 +0000 Subject: [PATCH] * Enlarged the default resolution to a width of 1024 (ie. usually 1024x768). * Refined the way how the default resolution is chosen: it now prefers the above with hi/true color over a width of 800 in hi/true color over the same order including palette modes. * If no suitable mode could be found, it now chooses the first mode from the list, if any, so that a VESA mode is always used when possible. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@24648 a95241bf-73f2-0310-859d-f6bbb57e9c96 --- src/system/boot/platform/bios_ia32/video.cpp | 21 +++++++++++++++----- 1 file changed, 16 insertions(+), 5 deletions(-) diff --git a/src/system/boot/platform/bios_ia32/video.cpp b/src/system/boot/platform/bios_ia32/video.cpp index 90362b4c24..b242aab1a0 100644 --- a/src/system/boot/platform/bios_ia32/video.cpp +++ b/src/system/boot/platform/bios_ia32/video.cpp @@ -405,11 +405,22 @@ vesa_init(vbe_info_block *info, video_mode **_standardMode) } // Choose default resolution (when no EDID information is available) - // TODO: eventually enlarge this to 1024x768? - const uint32 kWidth = 800; - standardMode = find_video_mode(kWidth, -1, false); - if (standardMode == NULL) - standardMode = find_video_mode(kWidth, -1, true); + const uint32 kPreferredWidth = 1024; + const uint32 kFallbackWidth = 800; + + standardMode = find_video_mode(kPreferredWidth, -1, false); + if (standardMode == NULL) { + standardMode = find_video_mode(kFallbackWidth, -1, false); + if (standardMode == NULL) { + standardMode = find_video_mode(kPreferredWidth, -1, true); + if (standardMode == NULL) + standardMode = find_video_mode(kFallbackWidth, -1, true); + } + } + if (standardMode == NULL) { + // just take any mode + standardMode = (video_mode *)list_get_first_item(&sModeList); + } if (standardMode == NULL) { // no usable VESA mode found...