mirror of
https://github.com/reactos/reactos.git
synced 2025-02-22 16:36:33 +00:00
[NTVDM]
Factor the shift of the interlaced high bit out of the for(...) loop (since the interlaced high bit is not modified anymore after), and add extra parentheses. svn path=/trunk/; revision=63209
This commit is contained in:
parent
d34fb08d13
commit
b9cff19fca
1 changed files with 8 additions and 9 deletions
|
@ -1136,6 +1136,7 @@ static VOID VgaUpdateFramebuffer(VOID)
|
|||
{
|
||||
/* Graphics mode */
|
||||
PBYTE GraphicsBuffer = (PBYTE)ConsoleFramebuffer;
|
||||
DWORD InterlaceHighBit = VGA_INTERLACE_HIGH_BIT;
|
||||
|
||||
/*
|
||||
* Synchronize access to the graphics framebuffer
|
||||
|
@ -1143,17 +1144,15 @@ static VOID VgaUpdateFramebuffer(VOID)
|
|||
*/
|
||||
WaitForSingleObject(ConsoleMutex, INFINITE);
|
||||
|
||||
/* Shift the high bit right by 1 in odd/even mode */
|
||||
if (VgaGcRegisters[VGA_GC_MODE_REG] & VGA_GC_MODE_OE)
|
||||
{
|
||||
InterlaceHighBit >>= 1;
|
||||
}
|
||||
|
||||
/* Loop through the scanlines */
|
||||
for (i = 0; i < Resolution.Y; i++)
|
||||
{
|
||||
DWORD InterlaceHighBit = VGA_INTERLACE_HIGH_BIT;
|
||||
|
||||
if (VgaGcRegisters[VGA_GC_MODE_REG] & VGA_GC_MODE_OE)
|
||||
{
|
||||
/* Shift the high bit right by 1 in odd/even mode */
|
||||
InterlaceHighBit >>= 1;
|
||||
}
|
||||
|
||||
if ((VgaGcRegisters[VGA_GC_MISC_REG] & VGA_GC_MISC_OE) && (i & 1))
|
||||
{
|
||||
/* Odd-numbered line in interlaced mode - set the high bit */
|
||||
|
@ -1309,7 +1308,7 @@ static VOID VgaUpdateFramebuffer(VOID)
|
|||
}
|
||||
}
|
||||
|
||||
if (VgaGcRegisters[VGA_GC_MISC_REG] & VGA_GC_MISC_OE && (i & 1))
|
||||
if ((VgaGcRegisters[VGA_GC_MISC_REG] & VGA_GC_MISC_OE) && (i & 1))
|
||||
{
|
||||
/* Clear the high bit */
|
||||
Address &= ~InterlaceHighBit;
|
||||
|
|
Loading…
Reference in a new issue