mirror of
https://github.com/reactos/reactos.git
synced 2024-11-20 06:15:26 +00:00
- Correctly swap the Red and Blue colors while setting the palette on non-VGA compatible adapters.
svn path=/trunk/; revision=9206
This commit is contained in:
parent
4e374dbe4b
commit
e7d451e2fd
1 changed files with 15 additions and 8 deletions
|
@ -761,11 +761,11 @@ VBESetColorRegisters(
|
|||
PSTATUS_BLOCK StatusBlock)
|
||||
{
|
||||
KV86M_REGISTERS BiosRegisters;
|
||||
ULONG Entry;
|
||||
PULONG OutputEntry;
|
||||
|
||||
if (DeviceExtension->VGACompatible)
|
||||
{
|
||||
ULONG Entry;
|
||||
|
||||
for (Entry = ColorLookUpTable->FirstEntry;
|
||||
Entry < ColorLookUpTable->NumEntries + ColorLookUpTable->FirstEntry;
|
||||
Entry++)
|
||||
|
@ -780,14 +780,21 @@ VBESetColorRegisters(
|
|||
else
|
||||
{
|
||||
/*
|
||||
* FIXME:
|
||||
* This is untested code path, it's possible that it will
|
||||
* not work at all or that Red and Blue colors will be swapped.
|
||||
* We can't just copy the values, because we need to swap the Red
|
||||
* and Blue values.
|
||||
*/
|
||||
|
||||
VideoPortMoveMemory(DeviceExtension->TrampolineMemory,
|
||||
&ColorLookUpTable->LookupTable[0].RgbArray,
|
||||
sizeof(DWORD) * ColorLookUpTable->NumEntries);
|
||||
for (Entry = ColorLookUpTable->FirstEntry,
|
||||
OutputEntry = DeviceExtension->TrampolineMemory;
|
||||
Entry < ColorLookUpTable->NumEntries + ColorLookUpTable->FirstEntry;
|
||||
Entry++, OutputEntry++)
|
||||
{
|
||||
*OutputEntry =
|
||||
(ColorLookUpTable->LookupTable[Entry].RgbArray.Red << 16) |
|
||||
(ColorLookUpTable->LookupTable[Entry].RgbArray.Green << 8) |
|
||||
(ColorLookUpTable->LookupTable[Entry].RgbArray.Blue);
|
||||
}
|
||||
|
||||
BiosRegisters.Eax = 0x4F09;
|
||||
BiosRegisters.Ebx = 0;
|
||||
BiosRegisters.Ecx = ColorLookUpTable->NumEntries;
|
||||
|
|
Loading…
Reference in a new issue