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

Alexandre Julliard julliard at wine.codeweavers.com
Mon Nov 16 09:43:47 CST 2015


Module: wine
Branch: master
Commit: ca8b3843abc7407212ec83c2d70d7a09bbb70ba3
URL:    http://source.winehq.org/git/wine.git/?a=commit;h=ca8b3843abc7407212ec83c2d70d7a09bbb70ba3

Author: Hugh McMaster <hugh.mcmaster at outlook.com>
Date:   Mon Nov 16 11:53:06 2015 +1100

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

Signed-off-by: Hugh McMaster <hugh.mcmaster at outlook.com>
Signed-off-by: Alexandre Julliard <julliard at winehq.org>

---

 programs/cmd/builtins.c | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/programs/cmd/builtins.c b/programs/cmd/builtins.c
index e9b9ddd..22f0580 100644
--- a/programs/cmd/builtins.c
+++ b/programs/cmd/builtins.c
@@ -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);
   }
 }




More information about the wine-cvs mailing list