mirror of
https://github.com/reactos/reactos.git
synced 2024-11-20 06:15:26 +00:00
[USETUP] Do a trick to avoid visual "blinking" during screen clearing. (#3255)
CORE-17312 Hide everything under the same foreground & background colors, so that the actual color and text blanking reset does not create a visual "blinking". Then, blank the text and finally reset the actual foreground & background colors. We do this because we cannot do the screen scrolling trick that would allow to change both the text and the colors at the same time (the function is currently not available in our console "emulation" layer).
This commit is contained in:
parent
66302e477c
commit
434fa562ce
1 changed files with 16 additions and 1 deletions
|
@ -235,17 +235,32 @@ CONSOLE_ClearScreen(VOID)
|
|||
coPos.X = 0;
|
||||
coPos.Y = 0;
|
||||
|
||||
/*
|
||||
* Hide everything under the same foreground & background colors, so that
|
||||
* the actual color and text blanking reset does not create a visual "blinking".
|
||||
* We do this because we cannot do the screen scrolling trick that would
|
||||
* allow to change both the text and the colors at the same time (the
|
||||
* function is currently not available in our console "emulation" layer).
|
||||
*/
|
||||
FillConsoleOutputAttribute(StdOutput,
|
||||
FOREGROUND_WHITE | BACKGROUND_BLUE,
|
||||
FOREGROUND_BLUE | BACKGROUND_BLUE,
|
||||
xScreen * yScreen,
|
||||
coPos,
|
||||
&Written);
|
||||
|
||||
/* Blank the text */
|
||||
FillConsoleOutputCharacterA(StdOutput,
|
||||
' ',
|
||||
xScreen * yScreen,
|
||||
coPos,
|
||||
&Written);
|
||||
|
||||
/* Reset the actual foreground & background colors */
|
||||
FillConsoleOutputAttribute(StdOutput,
|
||||
FOREGROUND_WHITE | BACKGROUND_BLUE,
|
||||
xScreen * yScreen,
|
||||
coPos,
|
||||
&Written);
|
||||
}
|
||||
|
||||
VOID
|
||||
|
|
Loading…
Reference in a new issue