Lines printed before entering fullscreen are now displayed correctly

This commit is contained in:
Jacobo Tarrío
2000-07-09 00:19:24 +00:00
parent fb0b5f4649
commit 9a2386a823
4 changed files with 35 additions and 16 deletions

View File

@@ -96,13 +96,15 @@ void GKbd::Init() {
#if defined(__USE_NCURSES__)
if(not curses_initialized++)
// Both screen and keyboard must be initialized at once
if(1 == (curses_initialized++)) {
initscr();
raw();
noecho();
nonl();
intrflush(stdscr, FALSE);
keypad(stdscr, TRUE);
raw();
noecho();
nonl();
intrflush(stdscr, FALSE);
keypad(stdscr, TRUE);
}
// WARNING: this might break with an old version of ncurses, or
// with another implementation of curses. I'm putting it here because
@@ -292,7 +294,7 @@ GKbd::~GKbd() {
#if defined(__USE_NCURSES__)
if(not --curses_initialized)
if(1 == (--curses_initialized))
endwin();
#elif defined(__WIN32__)

View File

@@ -134,7 +134,7 @@ GVid::~GVid() {
#if defined(__USE_NCURSES__)
attrset(A_NORMAL);
if(not --curses_initialized)
if(1 == (--curses_initialized))
endwin();
#elif defined(__UNIX__)
@@ -159,11 +159,15 @@ GVid::~GVid() {
void GVid::init() {
#if defined(__USE_NCURSES__)
if(not curses_initialized++)
// Both display and keyboard will be initialized at once
if(1 == (curses_initialized++)) {
initscr();
noecho();
nonl();
intrflush(stdscr, FALSE);
raw();
noecho();
nonl();
intrflush(stdscr, FALSE);
keypad(stdscr, TRUE);
}
#endif
// Detect video adapter