summaryrefslogtreecommitdiff
path: root/library/Console-linux.cpp
diff options
context:
space:
mode:
authorAlexander Gavrilov2012-06-14 13:08:39 +0400
committerAlexander Gavrilov2012-06-14 13:08:39 +0400
commitbbc1fb010ec16ea9260cfc6fe8cc122f79c2d0e6 (patch)
tree7f2fbaf5bcb2043270e54791b2a31e2daf142934 /library/Console-linux.cpp
parent7eb4fc19de542db0d3e271123f24773e0c8c481e (diff)
downloaddfhack-bbc1fb010ec16ea9260cfc6fe8cc122f79c2d0e6.tar.gz
dfhack-bbc1fb010ec16ea9260cfc6fe8cc122f79c2d0e6.tar.bz2
dfhack-bbc1fb010ec16ea9260cfc6fe8cc122f79c2d0e6.tar.xz
Fix TEXT mode support, even making it work somewhat.
- Initialize the global pointers before trying to use init. - Print a message suggesting the use of dfhack-run. - Don't start the console thread if there is no console. - When console is disabled, print anything given to it to stderr.
Diffstat (limited to 'library/Console-linux.cpp')
-rw-r--r--library/Console-linux.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/library/Console-linux.cpp b/library/Console-linux.cpp
index a1ebfad3..6b4de736 100644
--- a/library/Console-linux.cpp
+++ b/library/Console-linux.cpp
@@ -716,6 +716,8 @@ void Console::add_text(color_value color, const std::string &text)
lock_guard <recursive_mutex> g(*wlock);
if (inited)
d->print_text(color, text);
+ else
+ fwrite(text.data(), 1, text.size(), stderr);
}
int Console::get_columns(void)