Clear the VGA memory during initialization.
Clear the graphics framebuffer when switching to graphics mode.


svn path=/branches/ntvdm/; revision=59671
This commit is contained in:
Aleksandar Andrejevic 2013-08-07 21:15:02 +00:00
parent b4ed87bb3a
commit 94b6893a01

View file

@ -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();