some build fixes

This commit is contained in:
2022-01-07 01:58:38 +03:00
parent 3c8ccf357b
commit cbdaabee4a
5 changed files with 7 additions and 5 deletions

View File

@@ -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;

View File

@@ -22,6 +22,7 @@
#ifndef FREERTOS
#ifdef WINDOWS
# include <windows.h>
# include <wingdi.h>
# include <wincon.h>
# include <winuser.h>
#else

View File

@@ -21,6 +21,7 @@
#ifndef WINDOWS
# include <termios.h>
#else
# include <wingdi.h>
# include <wincon.h>
#endif

View File

@@ -27,6 +27,7 @@
#include "pibitarray.h"
#include "pimap.h"
#include "pivector2d.h"
#include <stdio.h>
#ifdef FREERTOS
# define _TYPENAME_(T) "?"

View File

@@ -24,6 +24,7 @@
#include "pistring_std.h"
#ifdef WINDOWS
# include <windows.h>
# include <wingdi.h>
# include <wincon.h>
# define COMMON_LVB_UNDERSCORE 0x8000
#endif