mirror of
https://github.com/reactos/reactos.git
synced 2025-02-22 16:36:33 +00:00
[FRAMEBUF] Correctly check the return value of the EngDeviceIoControl() call and return adequate value in DrvAssertMode().
This commit is contained in:
parent
60448f83fb
commit
3f716870ca
1 changed files with 8 additions and 7 deletions
|
@ -174,27 +174,28 @@ 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 (EngDeviceIoControl(ppdev->hDriver, IOCTL_VIDEO_SET_CURRENT_MODE,
|
||||
&(ppdev->ModeIndex), sizeof(ULONG), NULL, 0,
|
||||
&ulTemp))
|
||||
{
|
||||
/* We failed, bail out */
|
||||
return FALSE;
|
||||
}
|
||||
if (ppdev->BitsPerPixel == 8)
|
||||
{
|
||||
IntSetPalette(dhpdev, ppdev->PaletteEntries, 0, 256);
|
||||
}
|
||||
|
||||
return Result;
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
else
|
||||
{
|
||||
/*
|
||||
* Call the miniport driver to reset the device to a known state.
|
||||
*/
|
||||
|
||||
return !EngDeviceIoControl(ppdev->hDriver, IOCTL_VIDEO_RESET_DEVICE,
|
||||
NULL, 0, NULL, 0, &ulTemp);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue