mirror of
https://github.com/reactos/reactos.git
synced 2024-10-06 09:24:11 +00:00
- Use LinBytesPerScanLine (value for linar framebuffer modes) instead of BytesPerScanLine for VBE 3.0 controllers.
svn path=/trunk/; revision=10018
This commit is contained in:
parent
e4848fe100
commit
825a514a46
|
@ -88,8 +88,8 @@ VBESortModesCallback(PVBE_MODEINFO VbeModeInfoA, PVBE_MODEINFO VbeModeInfoB)
|
||||||
* be available we favor more bits per pixel. It should be changed
|
* be available we favor more bits per pixel. It should be changed
|
||||||
* later.
|
* later.
|
||||||
*/
|
*/
|
||||||
if (VbeModeInfoA->BitsPerPixel < VbeModeInfoB->BitsPerPixel) return 1;
|
if (VbeModeInfoA->BitsPerPixel < VbeModeInfoB->BitsPerPixel) return -1;
|
||||||
if (VbeModeInfoA->BitsPerPixel > VbeModeInfoB->BitsPerPixel) return -1;
|
if (VbeModeInfoA->BitsPerPixel > VbeModeInfoB->BitsPerPixel) return 1;
|
||||||
if (VbeModeInfoA->XResolution < VbeModeInfoB->XResolution) return -1;
|
if (VbeModeInfoA->XResolution < VbeModeInfoB->XResolution) return -1;
|
||||||
if (VbeModeInfoA->XResolution > VbeModeInfoB->XResolution) return 1;
|
if (VbeModeInfoA->XResolution > VbeModeInfoB->XResolution) return 1;
|
||||||
if (VbeModeInfoA->YResolution < VbeModeInfoB->YResolution) return -1;
|
if (VbeModeInfoA->YResolution < VbeModeInfoB->YResolution) return -1;
|
||||||
|
@ -737,10 +737,19 @@ VBEMapVideoMemory(
|
||||||
FrameBuffer.QuadPart =
|
FrameBuffer.QuadPart =
|
||||||
DeviceExtension->ModeInfo[DeviceExtension->CurrentMode].PhysBasePtr;
|
DeviceExtension->ModeInfo[DeviceExtension->CurrentMode].PhysBasePtr;
|
||||||
MapInformation->VideoRamBase = RequestedAddress->RequestedVirtualAddress;
|
MapInformation->VideoRamBase = RequestedAddress->RequestedVirtualAddress;
|
||||||
|
if (DeviceExtension->VbeInfo.Version < 0x300)
|
||||||
|
{
|
||||||
MapInformation->VideoRamLength =
|
MapInformation->VideoRamLength =
|
||||||
DeviceExtension->ModeInfo[DeviceExtension->CurrentMode].BytesPerScanLine *
|
DeviceExtension->ModeInfo[DeviceExtension->CurrentMode].BytesPerScanLine *
|
||||||
DeviceExtension->ModeInfo[DeviceExtension->CurrentMode].YResolution;
|
DeviceExtension->ModeInfo[DeviceExtension->CurrentMode].YResolution;
|
||||||
}
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
MapInformation->VideoRamLength =
|
||||||
|
DeviceExtension->ModeInfo[DeviceExtension->CurrentMode].LinBytesPerScanLine *
|
||||||
|
DeviceExtension->ModeInfo[DeviceExtension->CurrentMode].YResolution;
|
||||||
|
}
|
||||||
|
}
|
||||||
#ifdef VBE12_SUPPORT
|
#ifdef VBE12_SUPPORT
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
@ -816,7 +825,10 @@ VBEQueryMode(
|
||||||
VideoMode->ModeIndex = VideoModeId;
|
VideoMode->ModeIndex = VideoModeId;
|
||||||
VideoMode->VisScreenWidth = VBEMode->XResolution;
|
VideoMode->VisScreenWidth = VBEMode->XResolution;
|
||||||
VideoMode->VisScreenHeight = VBEMode->YResolution;
|
VideoMode->VisScreenHeight = VBEMode->YResolution;
|
||||||
|
if (DeviceExtension->VbeInfo.Version < 0x300)
|
||||||
VideoMode->ScreenStride = VBEMode->BytesPerScanLine;
|
VideoMode->ScreenStride = VBEMode->BytesPerScanLine;
|
||||||
|
else
|
||||||
|
VideoMode->ScreenStride = VBEMode->LinBytesPerScanLine;
|
||||||
VideoMode->NumberOfPlanes = VBEMode->NumberOfPlanes;
|
VideoMode->NumberOfPlanes = VBEMode->NumberOfPlanes;
|
||||||
VideoMode->BitsPerPlane = VBEMode->BitsPerPixel / VBEMode->NumberOfPlanes;
|
VideoMode->BitsPerPlane = VBEMode->BitsPerPixel / VBEMode->NumberOfPlanes;
|
||||||
VideoMode->Frequency = 1;
|
VideoMode->Frequency = 1;
|
||||||
|
|
Loading…
Reference in a new issue