mirror of
https://github.com/Mauler125/r5sdk.git
synced 2025-02-09 19:15:03 +01:00
Full fix for the console shrinking problem
The lower right bound should be incremented as well.
This commit is contained in:
parent
6ae47b744e
commit
86ac910e5e
@ -31,10 +31,15 @@ void SetConsoleBackgroundColor(COLORREF color)
|
||||
HANDLE consoleOut = GetStdHandle(STD_OUTPUT_HANDLE);
|
||||
GetConsoleScreenBufferInfoEx(consoleOut, &sbInfoEx);
|
||||
|
||||
// The '+= 1' is required, else the window will shrink
|
||||
// by '1' each time this function is getting called on
|
||||
// the same console window.
|
||||
// The +='' 1 is required, else the window will shrink
|
||||
// by '1' column and row each time this function is
|
||||
// getting called on the same console window. The
|
||||
// lower right bounds are detected inclusively on the
|
||||
// 'GetConsoleScreenBufferEx' call and exclusively
|
||||
// on the 'SetConsoleScreenBufferEx' call.
|
||||
sbInfoEx.srWindow.Right += 1;
|
||||
sbInfoEx.srWindow.Bottom += 1;
|
||||
|
||||
sbInfoEx.ColorTable[0] = color;
|
||||
SetConsoleScreenBufferInfoEx(consoleOut, &sbInfoEx);
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user