- got sdl2 branch compiling and game loads

This commit is contained in:
SoftCoder
2015-09-28 23:28:11 -07:00
parent 23ea9f6201
commit 8e439a2325
26 changed files with 214 additions and 107 deletions

View File

@@ -213,7 +213,7 @@ Thread::~Thread() {
if(isThreadExecuteCompleteStatus() == false) {
printf("**WARNING** thread destructor will KILL thread [%p]...\n",thread);
SDL_KillThread(thread);
//SDL_KillThread(thread);
}
else {
SDL_WaitThread(thread, NULL);
@@ -248,7 +248,7 @@ void Thread::start() {
BaseThread *base_thread = dynamic_cast<BaseThread *>(this);
if(base_thread) base_thread->setStarted(true);
thread = SDL_CreateThread(beginExecution, this);
thread = SDL_CreateThread(beginExecution, base_thread->getUniqueID().c_str(), this);
if(thread == NULL) {
if(base_thread) base_thread->setStarted(false);
@@ -380,7 +380,7 @@ void Thread::queueAutoCleanThread() {
void Thread::kill() {
MutexSafeWrapper safeMutex(mutexthreadAccessor);
SDL_KillThread(thread);
//SDL_KillThread(thread);
thread = NULL;
}