vgabios: Framebuffer fixes for CGA and planar graphics modes.
[seabios.git] / src / output.c
index 7c10d33e3635dbd9a583081cf9a7521fba11ff59..462ffb773d9c74f3ffb889ac508f526abe0660df 100644 (file)
@@ -49,7 +49,7 @@ debug_serial(char c)
     if (!CONFIG_DEBUG_SERIAL)
         return;
     int timeout = DEBUG_TIMEOUT;
-    while ((inb(CONFIG_DEBUG_SERIAL_PORT+SEROFF_LSR) & 0x60) != 0x60)
+    while ((inb(CONFIG_DEBUG_SERIAL_PORT+SEROFF_LSR) & 0x20) != 0x20)
         if (!timeout--)
             // Ran out of time.
             return;
@@ -63,7 +63,7 @@ debug_serial_flush(void)
     if (!CONFIG_DEBUG_SERIAL)
         return;
     int timeout = DEBUG_TIMEOUT;
-    while ((inb(CONFIG_DEBUG_SERIAL_PORT+SEROFF_LSR) & 0x40) != 0x40)
+    while ((inb(CONFIG_DEBUG_SERIAL_PORT+SEROFF_LSR) & 0x60) != 0x60)
         if (!timeout--)
             // Ran out of time.
             return;
@@ -115,7 +115,7 @@ screenc(char c)
 static void
 putc_screen(struct putcinfo *action, char c)
 {
-    if (CONFIG_SCREEN_AND_DEBUG)
+    if (ScreenAndDebug)
         putc_debug(&debuginfo, c);
     if (c == '\n')
         screenc('\r');
@@ -363,7 +363,7 @@ printf(const char *fmt, ...)
     va_start(args, fmt);
     bvprintf(&screeninfo, fmt, args);
     va_end(args);
-    if (CONFIG_SCREEN_AND_DEBUG)
+    if (ScreenAndDebug)
         debug_serial_flush();
 }