mirror of
https://github.com/reactos/reactos.git
synced 2024-12-26 00:54:40 +00:00
Minor fix
svn path=/trunk/; revision=1587
This commit is contained in:
parent
2965b6c9d7
commit
ed2b81a1b5
1 changed files with 11 additions and 4 deletions
|
@ -1,4 +1,4 @@
|
||||||
/* $Id: notevil.c,v 1.3 2001/01/16 20:58:58 phreak Exp $
|
/* $Id: notevil.c,v 1.4 2001/01/31 03:03:20 phreak Exp $
|
||||||
*
|
*
|
||||||
* notevil.c
|
* notevil.c
|
||||||
*
|
*
|
||||||
|
@ -210,12 +210,14 @@ main(
|
||||||
char *argv []
|
char *argv []
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
|
DWORD Written;
|
||||||
|
COORD Coord = { 0, 0 };
|
||||||
myself = GetModuleHandle(NULL);
|
myself = GetModuleHandle(NULL);
|
||||||
|
|
||||||
GetConsoleScreenBufferInfo (GetStdHandle(STD_OUTPUT_HANDLE),
|
GetConsoleScreenBufferInfo (GetStdHandle(STD_OUTPUT_HANDLE),
|
||||||
&ScreenBufferInfo);
|
&ScreenBufferInfo);
|
||||||
ScreenBufferInfo.dwSize.X = ScreenBufferInfo.srWindow.Right - ScreenBufferInfo.srWindow.Left;
|
ScreenBufferInfo.dwSize.X = ScreenBufferInfo.srWindow.Right - ScreenBufferInfo.srWindow.Left + 1;
|
||||||
ScreenBufferInfo.dwSize.Y = ScreenBufferInfo.srWindow.Bottom - ScreenBufferInfo.srWindow.Top;
|
ScreenBufferInfo.dwSize.Y = ScreenBufferInfo.srWindow.Bottom - ScreenBufferInfo.srWindow.Top + 1;
|
||||||
ScreenBuffer = CreateConsoleScreenBuffer(
|
ScreenBuffer = CreateConsoleScreenBuffer(
|
||||||
GENERIC_WRITE,
|
GENERIC_WRITE,
|
||||||
0,
|
0,
|
||||||
|
@ -232,7 +234,12 @@ main(
|
||||||
);
|
);
|
||||||
return EXIT_FAILURE;
|
return EXIT_FAILURE;
|
||||||
}
|
}
|
||||||
|
// Fill buffer with black background
|
||||||
|
FillConsoleOutputAttribute( ScreenBuffer,
|
||||||
|
0,
|
||||||
|
ScreenBufferInfo.dwSize.X * ScreenBufferInfo.dwSize.Y,
|
||||||
|
Coord,
|
||||||
|
&Written );
|
||||||
SetConsoleActiveScreenBuffer(ScreenBuffer);
|
SetConsoleActiveScreenBuffer(ScreenBuffer);
|
||||||
MainLoop();
|
MainLoop();
|
||||||
CloseHandle(ScreenBuffer);
|
CloseHandle(ScreenBuffer);
|
||||||
|
|
Loading…
Reference in a new issue