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
This commit is contained in:
Axel Dörfler
2005-11-01 18:03:35 +00:00
parent b4f34cfb95
commit 0752edcf8d
+9 -6
View File
@@ -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);