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:
parent
9e4e1cf9be
commit
ca8b3843ab
|
@ -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);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue