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