diff --git a/subsystems/ntvdm/vga.c b/subsystems/ntvdm/vga.c index 8b6f850a5f9..e939645401c 100644 --- a/subsystems/ntvdm/vga.c +++ b/subsystems/ntvdm/vga.c @@ -254,6 +254,9 @@ static BOOL VgaEnterGraphicsMode(PCOORD Resolution) ConsoleFramebuffer = GraphicsBufferInfo.lpBitMap; ConsoleMutex = GraphicsBufferInfo.hMutex; + /* Clear the framebuffer */ + ZeroMemory(ConsoleFramebuffer, BitmapInfo->bmiHeader.biSizeImage); + /* Set the active buffer */ SetConsoleActiveScreenBuffer(GraphicsConsoleBuffer); @@ -946,6 +949,9 @@ VOID VgaInitialize(HANDLE TextHandle) /* Set the global handle */ TextConsoleBuffer = TextHandle; + /* Clear the VGA memory */ + ZeroMemory(VgaMemory, VGA_NUM_BANKS * VGA_BANK_SIZE); + /* Set the default video mode */ BiosSetVideoMode(BIOS_DEFAULT_VIDEO_MODE); VgaUpdateMode();