From 68f8b9f89b9d15f4dd2d66378e99c1e44b7d7dd0 Mon Sep 17 00:00:00 2001 From: Hartmut Birr Date: Wed, 27 Apr 2005 21:10:44 +0000 Subject: [PATCH] Reinitialized the palette entries after setting the video mode in DrvAssertMode. svn path=/trunk/; revision=14831 --- reactos/drivers/video/displays/framebuf/surface.c | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/reactos/drivers/video/displays/framebuf/surface.c b/reactos/drivers/video/displays/framebuf/surface.c index 5067da0d895..c9cedf60df3 100644 --- a/reactos/drivers/video/displays/framebuf/surface.c +++ b/reactos/drivers/video/displays/framebuf/surface.c @@ -172,13 +172,19 @@ DrvAssertMode( if (bEnable) { + BOOLEAN Result; /* * Reinitialize the device to a clean state. */ + Result = EngDeviceIoControl(ppdev->hDriver, IOCTL_VIDEO_SET_CURRENT_MODE, + &(ppdev->ModeIndex), sizeof(ULONG), NULL, 0, + &ulTemp); + if (ppdev->BitsPerPixel == 8) + { + IntSetPalette(dhpdev, ppdev->PaletteEntries, 0, 256); + } + return Result; - return !EngDeviceIoControl(ppdev->hDriver, IOCTL_VIDEO_SET_CURRENT_MODE, - &(ppdev->ModeIndex), sizeof(ULONG), NULL, 0, - &ulTemp); } else {