Ported AC to SDL2
This commit is contained in:
committed by
aurhat
parent
9f537b0876
commit
f86579533a
@@ -74,7 +74,7 @@ void resolverinit()
|
||||
resolverthread &rt = resolverthreads.add();
|
||||
rt.query = NULL;
|
||||
rt.starttime = 0;
|
||||
rt.thread = SDL_CreateThread(resolverloop, &rt);
|
||||
rt.thread = SDL_CreateThread(resolverloop, "ResolverThread", &rt);
|
||||
}
|
||||
SDL_UnlockMutex(resolvermutex);
|
||||
}
|
||||
@@ -85,9 +85,12 @@ void resolverstop(resolverthread &rt)
|
||||
if(rt.query)
|
||||
{
|
||||
#ifndef __APPLE__
|
||||
SDL_KillThread(rt.thread);
|
||||
// FIXME SDL2: implement a replacement for this if necessary
|
||||
// Looks like the resolver thread should bail whenever
|
||||
// a new one is created anyway, no idea why this was ever necessary.
|
||||
//SDL_KillThread(rt.thread);
|
||||
#endif
|
||||
rt.thread = SDL_CreateThread(resolverloop, &rt);
|
||||
rt.thread = SDL_CreateThread(resolverloop, "ResolverThread", &rt);
|
||||
}
|
||||
rt.query = NULL;
|
||||
rt.starttime = 0;
|
||||
@@ -252,7 +255,7 @@ int connectwithtimeout(ENetSocket sock, const char *hostname, ENetAddress &addre
|
||||
if(!conncond) conncond = SDL_CreateCond();
|
||||
SDL_LockMutex(connmutex);
|
||||
connectdata cd = { sock, address, -1 };
|
||||
connthread = SDL_CreateThread(connectthread, &cd);
|
||||
connthread = SDL_CreateThread(connectthread, "ConnectThread", &cd);
|
||||
|
||||
int starttime = SDL_GetTicks(), timeout = 0;
|
||||
for(;;)
|
||||
|
||||
Reference in New Issue
Block a user