core: Only adjust screen if we're in text mode
authorMatt Fleming <matt.fleming@intel.com>
Tue, 14 Feb 2012 13:34:00 +0000 (13:34 +0000)
committerMatt Fleming <matt.fleming@intel.com>
Wed, 21 Mar 2012 10:24:24 +0000 (10:24 +0000)
A bug was introduced in commit 9f51b69d ("core: Reimplement lots asm
code in C") when converting the old asm comapi_usingvga function into
C. We only want to adjust the screen if we're not using VGA.

Signed-off-by: Matt Fleming <matt.fleming@intel.com>
core/graphics.c

index 864550b..4a4af55 100644 (file)
@@ -367,10 +367,6 @@ void pm_usingvga(com32sys_t *regs)
        GXPixCols = regs->ecx.w[0];
        GXPixRows = regs->edx.w[0];
 
-       if (UsingVGA & 0x08)
-               regs->eflags.l &= ~EFLAGS_CF;
-       else {
+       if (!(UsingVGA & 0x08))
                adjust_screen();
-               set_flags(regs, EFLAGS_CF);
-       }
 }