Author: hbelusca
Date: Fri May 9 22:07:49 2014
New Revision: 63209
URL: http://svn.reactos.org/svn/reactos?rev=63209&view=rev
Log:
[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.
Modified:
trunk/reactos/subsystems/ntvdm/hardware/vga.c
Modified: trunk/reactos/subsystems/ntvdm/hardware/vga.c
URL: http://svn.reactos.org/svn/reactos/trunk/reactos/subsystems/ntvdm/hardware/…
==============================================================================
--- trunk/reactos/subsystems/ntvdm/hardware/vga.c [iso-8859-1] (original)
+++ trunk/reactos/subsystems/ntvdm/hardware/vga.c [iso-8859-1] Fri May 9 22:07:49 2014
@@ -1136,6 +1136,7 @@
{
/* Graphics mode */
PBYTE GraphicsBuffer = (PBYTE)ConsoleFramebuffer;
+ DWORD InterlaceHighBit = VGA_INTERLACE_HIGH_BIT;
/*
* Synchronize access to the graphics framebuffer
@@ -1143,17 +1144,15 @@
*/
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 @@
}
}
- 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;
Author: hbelusca
Date: Fri May 9 20:25:41 2014
New Revision: 63206
URL: http://svn.reactos.org/svn/reactos?rev=63206&view=rev
Log:
[CABMAN]
In any case, we are returning the (!= success) status in case we failed to perform the file copy, so just test for != success just one time.
Patch by Victor Martinez.
CORE-8189 #resolve
Modified:
trunk/reactos/tools/cabman/dfp.cxx
Modified: trunk/reactos/tools/cabman/dfp.cxx
URL: http://svn.reactos.org/svn/reactos/trunk/reactos/tools/cabman/dfp.cxx?rev=6…
==============================================================================
--- trunk/reactos/tools/cabman/dfp.cxx [iso-8859-1] (original)
+++ trunk/reactos/tools/cabman/dfp.cxx [iso-8859-1] Fri May 9 20:25:41 2014
@@ -361,10 +361,8 @@
{
printf("ERROR: Directive file contains errors at line %u.\n", (UINT)CurrentLine);
DPRINT(MID_TRACE, ("Error while copying file.\n"));
+ return Status;
}
-
- if (Status != CAB_STATUS_SUCCESS)
- return Status;
}
break;