Ported AC to SDL2

This commit is contained in:
Jani-Markus Maunus
2018-02-10 11:28:48 +01:00
committed by aurhat
parent 9f537b0876
commit f86579533a
119 changed files with 33154 additions and 10826 deletions
+2 -2
View File
@@ -140,7 +140,7 @@ int pingallpckservers(void *data)
pckpinglog_lock = SDL_CreateMutex();
vector<SDL_Thread *> pckthreads;
int nop, good = 0, disabled = 0;
loopv(pckservers) if(pckservers[i]->priority > -1000) pckthreads.add(SDL_CreateThread(pingpckserver, pckservers[i])); // start pinging all servers at once
loopv(pckservers) if(pckservers[i]->priority > -1000) pckthreads.add(SDL_CreateThread(pingpckserver, NULL, pckservers[i])); // start pinging all servers at once
loopv(pckthreads) if(pckthreads[i]) SDL_WaitThread(pckthreads[i], &nop); // wait for all ping threads to finish
SDL_DestroyMutex(pckpinglog_lock);
loopv(pckservers)
@@ -165,7 +165,7 @@ void setupautodownload()
// fetch updates from all configured servers
// in a background thread
// during startup
pingallpckthread = SDL_CreateThread(pingallpckservers, NULL);
pingallpckthread = SDL_CreateThread(pingallpckservers, NULL, NULL);
}
void pollautodownloadresponse() // thread-safe feedback from the autodownload-updater thread