Port to SDL2

FossilOrigin-Name: 42d4b57828b48b9e38d8be3edcebca4c7cbca9948d8792a320df1f92c13465be
This commit is contained in:
Jonathan Schleifer 2025-03-04 23:51:09 +00:00
parent c3cd8d4fac
commit 3a1bbe3110
7 changed files with 52 additions and 84 deletions

View file

@ -60,23 +60,25 @@ resolverinit(int threads, int limit)
resolverthread &rt = resolverthreads.add();
rt.query = NULL;
rt.starttime = 0;
rt.thread = SDL_CreateThread(resolverloop, &rt);
rt.thread =
SDL_CreateThread(resolverloop, "resolverthread", &rt);
--threads;
};
};
}
}
void
resolverstop(resolverthread &rt, bool restart)
{
SDL_LockMutex(resolvermutex);
SDL_KillThread(rt.thread);
// SDL_KillThread(rt.thread);
rt.query = NULL;
rt.starttime = 0;
rt.thread = NULL;
if (restart)
rt.thread = SDL_CreateThread(resolverloop, &rt);
rt.thread =
SDL_CreateThread(resolverloop, "resolverthread", &rt);
SDL_UnlockMutex(resolvermutex);
};
}
void
resolverclear()