Formatting fix only.
[reactos.git] / subsystems / ntvdm / bios.c
index 37e84df..e7657c8 100644 (file)
@@ -304,7 +304,7 @@ BOOLEAN BiosSetVideoMode(BYTE ModeNumber)
     /* Update the values in the BDA */
     Bda->VideoMode = ModeNumber;
     Bda->VideoPage = 0;
-    Bda->VideoPageSize   = BIOS_PAGE_SIZE;
+    Bda->VideoPageSize = BIOS_PAGE_SIZE;
     Bda->VideoPageOffset = 0;
 
     /* Get the character height */
@@ -408,7 +408,12 @@ BOOLEAN BiosInitialize(VOID)
     }
 
     /* Initialize VGA */
-    VgaInitialize(BiosConsoleOutput);
+    if (!VgaInitialize(BiosConsoleOutput))
+    {
+        CloseHandle(BiosConsoleOutput);
+        CloseHandle(BiosConsoleInput);
+        return FALSE;
+    }
 
     /* Update the cursor position */
     BiosSetCursorPosition(BiosSavedBufferInfo.dwCursorPosition.Y,
@@ -629,6 +634,8 @@ VOID BiosVideoService(LPWORD Stack)
         case 0x00:
         {
             BiosSetVideoMode(LOBYTE(Eax));
+            VgaClearMemory();
+
             break;
         }
 
@@ -709,7 +716,7 @@ VOID BiosVideoService(LPWORD Stack)
             };
 
             /* Call the internal function */
-            BiosScrollWindow((HIBYTE(Eax)== 0x06)
+            BiosScrollWindow((HIBYTE(Eax) == 0x06)
                              ? SCROLL_DIRECTION_UP : SCROLL_DIRECTION_DOWN,
                              LOBYTE(Eax),
                              Rectangle,