diff options
Diffstat (limited to 'osdep/getch2-win.c')
-rw-r--r-- | osdep/getch2-win.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/osdep/getch2-win.c b/osdep/getch2-win.c index 3e6eeff086..326cf1a7d0 100644 --- a/osdep/getch2-win.c +++ b/osdep/getch2-win.c @@ -55,6 +55,12 @@ int screen_height=24; char * erase_to_end_of_line = NULL; void get_screen_size(void){ + CONSOLE_SCREEN_BUFFER_INFO cinfo; + if (GetConsoleScreenBufferInfo(GetStdHandle(STD_OUTPUT_HANDLE), &cinfo)) + { + screen_width = cinfo.dwMaximumWindowSize.X; + screen_height = cinfo.dwMaximumWindowSize.Y; + } } static HANDLE in; |