From db46d099bc2d98285803a87cbd58972eaa447fa7 Mon Sep 17 00:00:00 2001 From: Filip Navara Date: Thu, 26 May 2005 19:57:54 +0000 Subject: [PATCH] - Revert hacks added by GreatLord in revisons 15521 and 15522. - Fix mode enumeration code on few places. svn path=/trunk/; revision=15527 --- reactos/drivers/video/displays/framebuf/screen.c | 14 +++----------- 1 file changed, 3 insertions(+), 11 deletions(-) diff --git a/reactos/drivers/video/displays/framebuf/screen.c b/reactos/drivers/video/displays/framebuf/screen.c index ebe48975253..6b8557f2a41 100644 --- a/reactos/drivers/video/displays/framebuf/screen.c +++ b/reactos/drivers/video/displays/framebuf/screen.c @@ -90,17 +90,9 @@ GetAvailableModes( while (ulTemp--) { - /* - FIXME - Do only remove no supporet mode not reste the ModeInfoPtr->Length=0 - if the mode should be betwin 8 - 32 it will not found the rest - of the mode that comes after it. That why 24bits graphic card - fails. and that reason We add 15bpp check here - */ if ((ModeInfoPtr->NumberOfPlanes != 1) || !(ModeInfoPtr->AttributeFlags & VIDEO_MODE_GRAPHICS) || ((ModeInfoPtr->BitsPerPlane != 8) && - (ModeInfoPtr->BitsPerPlane != 15) && (ModeInfoPtr->BitsPerPlane != 16) && (ModeInfoPtr->BitsPerPlane != 24) && (ModeInfoPtr->BitsPerPlane != 32))) @@ -108,7 +100,6 @@ GetAvailableModes( ModeInfoPtr->Length = 0; } - ModeInfoPtr = (PVIDEO_MODE_INFORMATION) (((PUCHAR)ModeInfoPtr) + Modes.ModeInformationLength); } @@ -167,7 +158,6 @@ IntInitScreenInfo( ModeInfoPtr = ModeInfo; while (ModeCount-- > 0) { - if (ModeInfoPtr->Length > 0 && pDevMode->dmPelsWidth == ModeInfoPtr->VisScreenWidth && pDevMode->dmPelsHeight == ModeInfoPtr->VisScreenHeight && @@ -179,7 +169,8 @@ IntInitScreenInfo( break; } - ModeInfoPtr++; + ModeInfoPtr = (PVIDEO_MODE_INFORMATION) + (((PUCHAR)ModeInfoPtr) + ModeInfoSize); } } @@ -392,6 +383,7 @@ DrvGetModes( { if (ModeInfoPtr->Length == 0) { + ModeInfoPtr = (PVIDEO_MODE_INFORMATION)(((ULONG_PTR)ModeInfoPtr) + ModeInfoSize); continue; }