mirror of
https://github.com/glest/glest-source.git
synced 2025-08-28 10:19:55 +02:00
- added initial work to better manage rendering (but not yet enabled)
- added new commandline parameter: --version - some thread cleanup to try adjusted timings when threads shutdown
This commit is contained in:
@@ -15,7 +15,7 @@
|
||||
#include <iostream>
|
||||
|
||||
#define MAIN_FUNCTION(X) int main(int argc, char **argv) \
|
||||
{ std::cout << "About to init SDL..." << "\n"; \
|
||||
{ \
|
||||
if(SDL_Init(SDL_INIT_EVERYTHING) < 0) { \
|
||||
std::cerr << "Couldn't initialize SDL: " << SDL_GetError() << "\n"; \
|
||||
return 1; \
|
||||
|
@@ -97,11 +97,13 @@ void BaseThread::shutdownAndWait(BaseThread *pThread) {
|
||||
if(pThread->getRunningStatus() == false) {
|
||||
break;
|
||||
}
|
||||
sleep(0);
|
||||
sleep(1);
|
||||
//SystemFlags::OutputDebug(SystemFlags::debugNetwork,"In [%s::%s Line: %d]\n",__FILE__,__FUNCTION__,__LINE__);
|
||||
}
|
||||
sleep(1);
|
||||
SystemFlags::OutputDebug(SystemFlags::debugNetwork,"In [%s::%s Line: %d]\n",__FILE__,__FUNCTION__,__LINE__);
|
||||
}
|
||||
sleep(0);
|
||||
SystemFlags::OutputDebug(SystemFlags::debugNetwork,"In [%s::%s Line: %d]\n",__FILE__,__FUNCTION__,__LINE__);
|
||||
}
|
||||
|
||||
|
@@ -152,9 +152,8 @@ SystemFlags::~SystemFlags() {
|
||||
}
|
||||
|
||||
void SystemFlags::Close() {
|
||||
printf("START Closing logfiles\n");
|
||||
|
||||
if(SystemFlags::debugLogFileList.size() > 0) {
|
||||
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;
|
||||
@@ -176,7 +175,9 @@ void SystemFlags::Close() {
|
||||
}
|
||||
}
|
||||
|
||||
printf("END Closing logfiles\n");
|
||||
if(SystemFlags::debugLogFileList.size() > 0) {
|
||||
printf("END Closing logfiles\n");
|
||||
}
|
||||
}
|
||||
|
||||
void SystemFlags::handleDebug(DebugType type, const char *fmt, ...) {
|
||||
|
Reference in New Issue
Block a user