diff options
author | Stijn Buys <ingar@osirion.org> | 2008-11-12 18:23:11 +0000 |
---|---|---|
committer | Stijn Buys <ingar@osirion.org> | 2008-11-12 18:23:11 +0000 |
commit | 70f4455bd0f887477d027b85c8f2ead3d56eecfe (patch) | |
tree | 867e993ca7685f79147591e3545b1bcc7352e695 /src | |
parent | 773c1bafe0f1d8b706e0f72e235f8466e7a9ccf5 (diff) |
update ncurses console on new messages
Diffstat (limited to 'src')
-rw-r--r-- | src/dedicated/console.cc | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/src/dedicated/console.cc b/src/dedicated/console.cc index 74b1101..90acb7a 100644 --- a/src/dedicated/console.cc +++ b/src/dedicated/console.cc @@ -62,9 +62,6 @@ void Console::init() init_pair(7, COLOR_WHITE, -1); init_pair(8, -1, -1); } - console_initialized = true; - console_updated = true; - #endif // HAVE_CURSES con_print << "^BInitializing console..." << std::endl; @@ -77,6 +74,9 @@ void Console::init() server_console.console_scroll = 0; server_console.draw(); #endif // HAVE_CURSES + + console_initialized = true; + console_updated = true; } void Console::shutdown() @@ -122,7 +122,10 @@ void Console::resize() void Console::print(const std::string & text) { - console_updated = true; + if (console_initialized && !rcon()) { + console_updated = true; + draw(); + } } void Console::set_color(const char *color_code) |