mirror of
https://github.com/glest/glest-source.git
synced 2025-09-26 07:28:59 +02:00
- added another xerces XML validation flag
- added new commandline option: opengl-info to output graphics card info - added some opengl rendering optimzations
This commit is contained in:
@@ -42,6 +42,7 @@ std::map<SystemFlags::DebugType,SystemFlags::SystemFlagsType> SystemFlags::debug
|
||||
int SystemFlags::lockFile = -1;
|
||||
int SystemFlags::lockFileCountIndex = -1;
|
||||
string SystemFlags::lockfilename = "";
|
||||
bool SystemFlags::haveSpecialOutputCommandLineOption = false;
|
||||
CURL *SystemFlags::curl_handle = NULL;
|
||||
int SystemFlags::DEFAULT_HTTP_TIMEOUT = 10;
|
||||
//
|
||||
@@ -147,7 +148,8 @@ CURL *SystemFlags::initHTTP() {
|
||||
return handle;
|
||||
}
|
||||
|
||||
void SystemFlags::init() {
|
||||
void SystemFlags::init(bool haveSpecialOutputCommandLineOption) {
|
||||
SystemFlags::haveSpecialOutputCommandLineOption = haveSpecialOutputCommandLineOption;
|
||||
if(SystemFlags::debugLogFileList.size() == 0) {
|
||||
SystemFlags::debugLogFileList[SystemFlags::debugSystem] = SystemFlags::SystemFlagsType(SystemFlags::debugSystem);
|
||||
SystemFlags::debugLogFileList[SystemFlags::debugNetwork] = SystemFlags::SystemFlagsType(SystemFlags::debugNetwork);
|
||||
@@ -206,7 +208,10 @@ SystemFlags::~SystemFlags() {
|
||||
|
||||
void SystemFlags::Close() {
|
||||
if(SystemFlags::debugLogFileList.size() > 0) {
|
||||
printf("START Closing logfiles\n");
|
||||
if(SystemFlags::haveSpecialOutputCommandLineOption == false) {
|
||||
printf("START Closing logfiles\n");
|
||||
}
|
||||
|
||||
for(std::map<SystemFlags::DebugType,SystemFlags::SystemFlagsType>::iterator iterMap = SystemFlags::debugLogFileList.begin();
|
||||
iterMap != SystemFlags::debugLogFileList.end(); iterMap++) {
|
||||
SystemFlags::SystemFlagsType ¤tDebugLog = iterMap->second;
|
||||
@@ -229,13 +234,15 @@ void SystemFlags::Close() {
|
||||
}
|
||||
|
||||
if(SystemFlags::debugLogFileList.size() > 0) {
|
||||
printf("END Closing logfiles\n");
|
||||
if(SystemFlags::haveSpecialOutputCommandLineOption == false) {
|
||||
printf("END Closing logfiles\n");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void SystemFlags::handleDebug(DebugType type, const char *fmt, ...) {
|
||||
if(SystemFlags::debugLogFileList.size() == 0) {
|
||||
SystemFlags::init();
|
||||
SystemFlags::init(false);
|
||||
}
|
||||
SystemFlags::SystemFlagsType ¤tDebugLog = SystemFlags::debugLogFileList[type];
|
||||
if(currentDebugLog.enabled == false) {
|
||||
@@ -312,13 +319,17 @@ void SystemFlags::handleDebug(DebugType type, const char *fmt, ...) {
|
||||
SystemFlags::lockfilename = newlockfile;
|
||||
debugLog += intToStr(idx);
|
||||
|
||||
printf("Opening additional logfile [%s]\n",debugLog.c_str());
|
||||
if(SystemFlags::haveSpecialOutputCommandLineOption == false) {
|
||||
printf("Opening additional logfile [%s]\n",debugLog.c_str());
|
||||
}
|
||||
}
|
||||
}
|
||||
else if(SystemFlags::lockFileCountIndex > 0) {
|
||||
debugLog += intToStr(SystemFlags::lockFileCountIndex);
|
||||
|
||||
printf("Opening additional logfile [%s]\n",debugLog.c_str());
|
||||
if(SystemFlags::haveSpecialOutputCommandLineOption == false) {
|
||||
printf("Opening additional logfile [%s]\n",debugLog.c_str());
|
||||
}
|
||||
}
|
||||
|
||||
if(currentDebugLog.fileStream == NULL) {
|
||||
@@ -328,7 +339,9 @@ void SystemFlags::handleDebug(DebugType type, const char *fmt, ...) {
|
||||
currentDebugLog.mutex = new Mutex();
|
||||
}
|
||||
|
||||
printf("Opening logfile [%s] type = %d, currentDebugLog.fileStreamOwner = %d\n",debugLog.c_str(),type, currentDebugLog.fileStreamOwner);
|
||||
if(SystemFlags::haveSpecialOutputCommandLineOption == false) {
|
||||
printf("Opening logfile [%s] type = %d, currentDebugLog.fileStreamOwner = %d\n",debugLog.c_str(),type, currentDebugLog.fileStreamOwner);
|
||||
}
|
||||
|
||||
MutexSafeWrapper safeMutex(currentDebugLog.mutex);
|
||||
|
||||
|
Reference in New Issue
Block a user