mirror of
https://github.com/radareorg/radare2.git
synced 2024-12-01 00:51:19 +00:00
Implement w32 terminal size detection (fails on wine, untested on cmd.exe)
This commit is contained in:
parent
c6ebdac011
commit
45a1eb5ca0
@ -578,7 +578,12 @@ R_API int r_cons_get_cursor(int *rows) {
|
||||
|
||||
// XXX: if this function returns <0 in rows or cols expect MAYHEM
|
||||
R_API int r_cons_get_size(int *rows) {
|
||||
#if EMSCRIPTEN
|
||||
#if __WINDOWS__
|
||||
CONSOLE_SCREEN_BUFFER_INFO csbi;
|
||||
GetConsoleScreenBufferInfo (GetStdHandle (STD_OUTPUT_HANDLE), &csbi);
|
||||
I.columns = csbi.srWindow.Right - csbi.srWindow.Left + 1;
|
||||
I.rows = csbi.srWindow.Bottom - csbi.srWindow.Top + 1;
|
||||
#elif EMSCRIPTEN
|
||||
I.columns = 80;
|
||||
I.rows = 23;
|
||||
#elif __UNIX__
|
||||
|
Loading…
Reference in New Issue
Block a user