[VGA/VGA_NEW]

Fix MSVC warnings

svn path=/trunk/; revision=57786
This commit is contained in:
Timo Kreuzer 2012-12-01 11:49:59 +00:00
parent 9b5490c235
commit 1daa25afee
2 changed files with 7 additions and 5 deletions

View file

@ -21,7 +21,7 @@ VGA_REGISTERS TextModeRegs;
static VOID FASTCALL
vgaSaveRegisters(PVGA_REGISTERS Registers)
{
SIZE_T i;
UCHAR i;
for (i = 0; i < sizeof(Registers->CRT); i++)
{
@ -54,7 +54,7 @@ vgaSaveRegisters(PVGA_REGISTERS Registers)
static VOID FASTCALL
vgaSetRegisters(PVGA_REGISTERS Registers)
{
SIZE_T i;
UCHAR i;
/* Update misc output register */
VideoPortWritePortUchar(MISC, Registers->Misc);

View file

@ -168,7 +168,7 @@ InitializeModeTable(IN PHW_DEVICE_EXTENSION VgaExtension)
ULONG Size, ScreenSize;
PVIDEOMODE VgaMode;
PVOID BaseAddress;
ULONG ScreenStride = 0;
ULONG ScreenStride;
PHYSICAL_ADDRESS PhysicalAddress;
/* Enable only default vga modes if no vesa */
@ -345,7 +345,8 @@ InitializeModeTable(IN PHW_DEVICE_EXTENSION VgaExtension)
{
/* Read the screen stride (scanline size) */
ScreenStride = RaiseToPower2(VbeModeInfo->BytesPerScanLine);
VgaMode->wbytes = ScreenStride;
//ASSERT(ScreenStride <= MAX_USHORT);
VgaMode->wbytes = (USHORT)ScreenStride;
//VideoPortDebugPrint(0, "ScanLines: %lx Stride: %lx\n", VbeModeInfo->BytesPerScanLine, VgaMode->Stride);
/* Size of frame buffer is Height X ScanLine, align to bank/page size */
@ -372,7 +373,8 @@ InitializeModeTable(IN PHW_DEVICE_EXTENSION VgaExtension)
//VideoPortDebugPrint(0, "LINEAR MODE!!!\n");
ScreenStride = (VbeVersion >= 0x300) ? VbeModeInfo->LinBytesPerScanLine : 0;
if (!ScreenStride) ScreenStride = VbeModeInfo->BytesPerScanLine;
VgaMode->wbytes = ScreenStride;
//ASSERT(ScreenStride <= MAX_USHORT);
VgaMode->wbytes = (USHORT)ScreenStride;
//VideoPortDebugPrint(0, "ScanLines: %lx Stride: %lx\n", VbeModeInfo->BytesPerScanLine, VgaMode->Stride);
/* Size of frame buffer is Height X ScanLine, align to page size */