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);
|
HANDLE consoleOut = GetStdHandle(STD_OUTPUT_HANDLE);
|
||||||
GetConsoleScreenBufferInfoEx(consoleOut, &sbInfoEx);
|
GetConsoleScreenBufferInfoEx(consoleOut, &sbInfoEx);
|
||||||
|
|
||||||
// The '+= 1' is required, else the window will shrink
|
// The +='' 1 is required, else the window will shrink
|
||||||
// by '1' each time this function is getting called on
|
// by '1' column and row each time this function is
|
||||||
// the same console window.
|
// 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.srWindow.Bottom += 1;
|
||||||
|
|
||||||
sbInfoEx.ColorTable[0] = color;
|
sbInfoEx.ColorTable[0] = color;
|
||||||
SetConsoleScreenBufferInfoEx(consoleOut, &sbInfoEx);
|
SetConsoleScreenBufferInfoEx(consoleOut, &sbInfoEx);
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user