Lines printed before entering fullscreen are now displayed correctly
This commit is contained in:
@@ -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__)
|
||||
|
@@ -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
|
||||
|
Reference in New Issue
Block a user