some build fixes
This commit is contained in:
@@ -23,6 +23,7 @@
|
||||
# include <fcntl.h>
|
||||
# include <termios.h>
|
||||
#else
|
||||
# include <wingdi.h>
|
||||
# include <wincon.h>
|
||||
# ifndef COMMON_LVB_UNDERSCORE
|
||||
# define COMMON_LVB_UNDERSCORE 0x8000
|
||||
@@ -108,16 +109,13 @@ void PIScreen::SystemConsole::end() {
|
||||
|
||||
|
||||
void PIScreen::SystemConsole::prepare() {
|
||||
int w, h;
|
||||
int w = 80, h = 24;
|
||||
#ifdef WINDOWS
|
||||
GetConsoleScreenBufferInfo(PRIVATE->hOut, &PRIVATE->csbi);
|
||||
w = PRIVATE->csbi.srWindow.Right - PRIVATE->csbi.srWindow.Left + 1;
|
||||
h = PRIVATE->csbi.srWindow.Bottom - PRIVATE->csbi.srWindow.Top + 1;
|
||||
#else
|
||||
# ifdef FREERTOS
|
||||
w = 80;
|
||||
h = 24;
|
||||
# else
|
||||
# ifndef FREERTOS
|
||||
winsize ws;
|
||||
ioctl(0, TIOCGWINSZ, &ws);
|
||||
w = ws.ws_col;
|
||||
|
||||
Reference in New Issue
Block a user