#include "vbemp.h"
-#define NDEBUG
-#include <debug.h>
-
/* PUBLIC AND PRIVATE FUNCTIONS ***********************************************/
VP_STATUS STDCALL
static int
VBESortModesCallback(PVBE_MODEINFO VbeModeInfoA, PVBE_MODEINFO VbeModeInfoB)
{
- DPRINT("VBESortModesCallback: %dx%dx%d / %dx%dx%d\n",
+ VideoPortDebugPrint(Info, "VBESortModesCallback: %dx%dx%d / %dx%dx%d\n",
VbeModeInfoA->XResolution, VbeModeInfoA->YResolution,
VbeModeInfoA->BitsPerPixel,
VbeModeInfoB->XResolution, VbeModeInfoB->YResolution,
if (Status != NO_ERROR)
{
- DPRINT1("Failed to get Int 10 service functions (Status %x)\n", Status);
+ VideoPortDebugPrint(Error, "Failed to get Int 10 service functions (Status %x)\n", Status);
return FALSE;
}
if (Status != NO_ERROR)
{
- DPRINT1("Failed to allocate virtual memory (Status %x)\n", Status);
+ VideoPortDebugPrint(Error, "Failed to allocate virtual memory (Status %x)\n", Status);
return FALSE;
}
sizeof(VBEDeviceExtension->VbeInfo));
/* Verify VBE is found and not anýthing else */
- if (strncmp(VBEDeviceExtension->VbeInfo.Signature,"VESA",4) != 0)
+ if (VideoPortCompareMemory(VBEDeviceExtension->VbeInfo.Signature, "VESA", 4) != 4)
{
- DPRINT("No VBE BIOS present\n");
+ VideoPortDebugPrint(Warn, "No VBE BIOS present\n");
return FALSE;
}
VBEDeviceExtension->VbeInfo.Version = 0x102;
}
- DPRINT("VBE BIOS Present (%d.%d, %8ld Kb)\n",
+ VideoPortDebugPrint(Trace, "VBE BIOS Present (%d.%d, %8ld Kb)\n",
VBEDeviceExtension->VbeInfo.Version / 0x100,
VBEDeviceExtension->VbeInfo.Version & 0xFF,
VBEDeviceExtension->VbeInfo.TotalMemory * 64);
if (VBEDeviceExtension->VbeInfo.Version < 0x200)
#endif
{
- DPRINT("VBE BIOS present, but incompatible version.\n");
+ VideoPortDebugPrint(Warn, "VBE BIOS present, but incompatible version.\n");
return FALSE;
}
}
else
{
- DPRINT("No VBE BIOS found.\n");
+ VideoPortDebugPrint(Warn, "No VBE BIOS found.\n");
return FALSE;
}
*/
VBEDeviceExtension->ModeInfo =
- ExAllocatePool(PagedPool, ModeCount * sizeof(VBE_MODEINFO));
+ VideoPortAllocatePool(HwDeviceExtension, VpPagedPool, ModeCount * sizeof(VBE_MODEINFO), TAG_VBE);
VBEDeviceExtension->ModeNumbers =
- ExAllocatePool(PagedPool, ModeCount * sizeof(WORD));
+ VideoPortAllocatePool(HwDeviceExtension, VpPagedPool, ModeCount * sizeof(WORD), TAG_VBE);
/*
* Get the actual mode infos.
if (SuitableModeCount == 0)
{
- DPRINT("VBEMP: No video modes supported\n");
+ VideoPortDebugPrint(Warn, "VBEMP: No video modes supported\n");
return FALSE;
}
* Print the supported video modes when NDEBUG is not set.
*/
-#ifndef NDEBUG
for (CurrentMode = 0;
CurrentMode < SuitableModeCount;
CurrentMode++)
{
- DPRINT("%dx%dx%d\n",
+ VideoPortDebugPrint(Trace, "%dx%dx%d\n",
VBEDeviceExtension->ModeInfo[CurrentMode].XResolution,
VBEDeviceExtension->ModeInfo[CurrentMode].YResolution,
VBEDeviceExtension->ModeInfo[CurrentMode].BitsPerPixel);
}
-#endif
return TRUE;
}
}
else
{
- DPRINT1("VBEMP: VBESetCurrentMode failed (%x)\n", BiosRegisters.Eax);
+ VideoPortDebugPrint(Error, "VBEMP: VBESetCurrentMode failed (%x)\n", BiosRegisters.Eax);
DeviceExtension->CurrentMode = -1;
}