mirror of
https://github.com/p-ranav/indicators.git
synced 2025-12-08 05:30:22 +08:00
Update indicators.hpp
This commit is contained in:
@@ -1299,9 +1299,9 @@ namespace indicators {
|
||||
|
||||
static inline std::pair<size_t, size_t> terminal_size() {
|
||||
CONSOLE_SCREEN_BUFFER_INFO csbi;
|
||||
int columns, rows;
|
||||
int cols, rows;
|
||||
GetConsoleScreenBufferInfo(GetStdHandle(STD_OUTPUT_HANDLE), &csbi);
|
||||
columns = csbi.srWindow.Right - csbi.srWindow.Left + 1;
|
||||
cols = csbi.srWindow.Right - csbi.srWindow.Left + 1;
|
||||
rows = csbi.srWindow.Bottom - csbi.srWindow.Top + 1;
|
||||
return {static_cast<size_t>(rows), static_cast<size_t>(cols)};
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user