Commit ca8b3843 authored by Hugh McMaster's avatar Hugh McMaster Committed by Alexandre Julliard

cmd: Set colour attributes when clearing the screen with 'cls'.

parent 9e4e1cf9
......@@ -236,13 +236,14 @@ void WCMD_clear_screen (void) {
if (GetConsoleScreenBufferInfo(hStdOut, &consoleInfo))
{
COORD topLeft;
DWORD screenSize;
DWORD screenSize, written;
screenSize = consoleInfo.dwSize.X * (consoleInfo.dwSize.Y + 1);
topLeft.X = 0;
topLeft.Y = 0;
FillConsoleOutputCharacterW(hStdOut, ' ', screenSize, topLeft, &screenSize);
FillConsoleOutputCharacterW(hStdOut, ' ', screenSize, topLeft, &written);
FillConsoleOutputAttribute(hStdOut, consoleInfo.wAttributes, screenSize, topLeft, &written);
SetConsoleCursorPosition(hStdOut, topLeft);
}
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment