[FREELDR]

Set proper video mode for VESA graphical
Remove one magic value usage

svn path=/trunk/; revision=56137
This commit is contained in:
Pierre Schweitzer 2012-03-12 23:00:56 +00:00
parent c59095903a
commit efffb2f0b1
2 changed files with 4 additions and 4 deletions

View file

@ -798,7 +798,7 @@ PcVideoSetMode(USHORT NewMode)
ScreenHeight = VesaVideoModeInformation.HeightInPixels; ScreenHeight = VesaVideoModeInformation.HeightInPixels;
BytesPerScanLine = VesaVideoModeInformation.BytesPerScanLine; BytesPerScanLine = VesaVideoModeInformation.BytesPerScanLine;
BiosVideoMode = NewMode; BiosVideoMode = NewMode;
DisplayMode = VideoTextMode; DisplayMode = VideoGraphicsMode;
VesaVideoMode = TRUE; VesaVideoMode = TRUE;
return TRUE; return TRUE;

View file

@ -338,11 +338,11 @@ DetectBiosDisks(PCONFIGURATION_COMPONENT_DATA SystemKey,
* harddisks. So, we set the buffer to known contents first, then try to * harddisks. So, we set the buffer to known contents first, then try to
* read. If the BIOS reports success but the buffer contents haven't * read. If the BIOS reports success but the buffer contents haven't
* changed then we fail anyway */ * changed then we fail anyway */
memset((PVOID) DISKREADBUFFER, 0xcd, 512); memset((PVOID) DISKREADBUFFER, 0xcd, DISKREADBUFFER_SIZE);
while (MachDiskReadLogicalSectors(0x80 + DiskCount, 0ULL, 1, (PVOID)DISKREADBUFFER)) while (MachDiskReadLogicalSectors(0x80 + DiskCount, 0ULL, 1, (PVOID)DISKREADBUFFER))
{ {
Changed = FALSE; Changed = FALSE;
for (i = 0; ! Changed && i < 512; i++) for (i = 0; ! Changed && i < DISKREADBUFFER_SIZE; i++)
{ {
Changed = ((PUCHAR)DISKREADBUFFER)[i] != 0xcd; Changed = ((PUCHAR)DISKREADBUFFER)[i] != 0xcd;
} }
@ -353,7 +353,7 @@ DetectBiosDisks(PCONFIGURATION_COMPONENT_DATA SystemKey,
break; break;
} }
DiskCount++; DiskCount++;
memset((PVOID) DISKREADBUFFER, 0xcd, 512); memset((PVOID) DISKREADBUFFER, 0xcd, DISKREADBUFFER_SIZE);
} }
DiskReportError(TRUE); DiskReportError(TRUE);
TRACE("BIOS reports %d harddisk%s\n", TRACE("BIOS reports %d harddisk%s\n",