From 0752edcf8d7976903e0fac7403eca97056661bfa Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Axel=20D=C3=B6rfler?= Date: Tue, 1 Nov 2005 18:03:35 +0000 Subject: [PATCH] The default video mode now prefers to be 800x600x16 - if available. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@14620 a95241bf-73f2-0310-859d-f6bbb57e9c96 --- src/system/boot/platform/bios_ia32/video.cpp | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/src/system/boot/platform/bios_ia32/video.cpp b/src/system/boot/platform/bios_ia32/video.cpp index 101ad3dca1..08a1d8f7e9 100644 --- a/src/system/boot/platform/bios_ia32/video.cpp +++ b/src/system/boot/platform/bios_ia32/video.cpp @@ -139,7 +139,7 @@ vesa_init(vbe_info_block *info, video_mode **_standardMode) if (vesa_get_vbe_info_block(info) != B_OK) return B_ERROR; - // fill mode list + // fill mode list and find standard video mode video_mode *standardMode = NULL; @@ -176,14 +176,17 @@ vesa_init(vbe_info_block *info, video_mode **_standardMode) videoMode->height = modeInfo.height; videoMode->bits_per_pixel = modeInfo.bits_per_pixel; - // ToDo: for now, only accept 8 bit modes as standard - if (standardMode == NULL && modeInfo.bits_per_pixel == 8) + if (standardMode == NULL) standardMode = videoMode; - else if (standardMode != NULL) { + else if (standardMode != NULL && modeInfo.bits_per_pixel <= 16) { + // for the standard mode, we prefer a bit depth of 16 // switch to the one with the higher resolution // ToDo: is that always a good idea? for now we'll use 800x600 - if (modeInfo.width > standardMode->width && modeInfo.width <= 800) - standardMode = videoMode; + if (modeInfo.width >= standardMode->width && modeInfo.width <= 800) { + if (modeInfo.width != standardMode->width + || modeInfo.bits_per_pixel >= standardMode->bits_per_pixel) + standardMode = videoMode; + } } list_add_item(&sModeList, videoMode);