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 {