From 3f69da1f62e201e41705c027651722b27115c12a Mon Sep 17 00:00:00 2001 From: Mark Vejvoda Date: Fri, 2 Dec 2011 22:24:47 +0000 Subject: [PATCH] - do NOT output missing language text messages in headless mode --- source/glest_game/global/lang.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/source/glest_game/global/lang.cpp b/source/glest_game/global/lang.cpp index a3e84ef0..8b95a0e9 100644 --- a/source/glest_game/global/lang.cpp +++ b/source/glest_game/global/lang.cpp @@ -280,7 +280,11 @@ string Lang::get(const string &s, string uselanguage, bool fallbackToDefault) { } catch(exception &ex) { if(strings.getpath() != "") { - if(fallbackToDefault == false || SystemFlags::VERBOSE_MODE_ENABLED) SystemFlags::OutputDebug(SystemFlags::debugError,"In [%s::%s Line: %d] Error [%s] uselanguage [%s] text [%s]\n",__FILE__,__FUNCTION__,__LINE__,ex.what(),uselanguage.c_str(),s.c_str()); + if(fallbackToDefault == false || SystemFlags::VERBOSE_MODE_ENABLED) { + if(GlobalStaticFlags::getIsNonGraphicalModeEnabled() == false) { + SystemFlags::OutputDebug(SystemFlags::debugError,"In [%s::%s Line: %d] Error [%s] uselanguage [%s] text [%s]\n",__FILE__,__FUNCTION__,__LINE__,ex.what(),uselanguage.c_str(),s.c_str()); + } + } } //printf("#2 fallbackToDefault = %d [%s] uselanguage [%s] DEFAULT_LANGUAGE [%s] this->language [%s]\n",fallbackToDefault,s.c_str(),uselanguage.c_str(),DEFAULT_LANGUAGE,this->language.c_str());