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

Signed-off-by: Hugh McMaster <hugh.mcmaster@outlook.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
Hugh McMaster 2015-11-16 11:53:06 +11:00 committed by Alexandre Julliard
parent 9e4e1cf9be
commit ca8b3843ab
1 changed files with 3 additions and 2 deletions

View File

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