Use window size when buffer size > 100 lines

This commit is contained in:
Alexander S. Aganichev
2002-07-08 14:07:59 +00:00
parent 5bbcdba9f2
commit 105c2e765d
2 changed files with 10 additions and 0 deletions

View File

@@ -595,6 +595,13 @@ void GVid::detectinfo(GVidInfo* _info) {
_info->cursor.column = csbi.dwCursorPosition.X;
_info->color.textattr = csbi.wAttributes;
if(_info->screen.rows > 100) {
_info->screen.rows = csbi.srWindow.Bottom - csbi.srWindow.Top + 1;
_info->screen.columns = csbi.srWindow.Right - csbi.srWindow.Left + 1;
_info->cursor.row = csbi.dwCursorPosition.Y - csbi.srWindow.Top + 1;
_info->cursor.column = csbi.dwCursorPosition.X - csbi.srWindow.Left + 1;
}
// Get cursor form
CONSOLE_CURSOR_INFO cci;
GetConsoleCursorInfo(gvid_hout, &cci);