bugfixes to correct segfault

This commit is contained in:
Mark Vejvoda
2010-06-17 22:09:25 +00:00
parent 2015843d69
commit a287422930
6 changed files with 9 additions and 61 deletions

View File

@@ -71,13 +71,6 @@ public:
bool getTaskSignalled();
};
class PumpSDLEventsTaskThread : public BaseThread
{
public:
PumpSDLEventsTaskThread();
virtual void execute();
};
}}//end namespace
#endif

View File

@@ -155,37 +155,4 @@ bool SimpleTaskThread::getTaskSignalled() {
return retval;
}
PumpSDLEventsTaskThread::PumpSDLEventsTaskThread() : BaseThread() {
}
void PumpSDLEventsTaskThread::execute() {
SystemFlags::OutputDebug(SystemFlags::debugNetwork,"In [%s::%s Line: %d]\n",__FILE__,__FUNCTION__,__LINE__);
setRunningStatus(true);
SystemFlags::OutputDebug(SystemFlags::debugNetwork,"SDL_PumpEvents thread is running\n");
try {
for(;getQuitStatus() == false;) {
SDL_PumpEvents();
sleep(25);
}
SystemFlags::OutputDebug(SystemFlags::debugSystem,"In [%s::%s Line: %d]\n",__FILE__,__FUNCTION__,__LINE__);
}
catch(const exception &ex) {
SystemFlags::OutputDebug(SystemFlags::debugNetwork,"In [%s::%s Line: %d] error [%s]\n",__FILE__,__FUNCTION__,__LINE__,ex.what());
setRunningStatus(false);
}
catch(...) {
SystemFlags::OutputDebug(SystemFlags::debugNetwork,"In [%s::%s Line: %d] unknown error\n",__FILE__,__FUNCTION__,__LINE__);
setRunningStatus(false);
}
setRunningStatus(false);
SystemFlags::OutputDebug(SystemFlags::debugNetwork,"SDL_PumpEvents thread is exiting\n");
SystemFlags::OutputDebug(SystemFlags::debugNetwork,"In [%s::%s Line: %d]\n",__FILE__,__FUNCTION__,__LINE__);
}
}}//end namespace