2024-06-22 14:51:58 +00:00
|
|
|
#include "sim_thread.h"
|
2024-09-21 15:07:22 +00:00
|
|
|
|
2024-06-22 14:51:58 +00:00
|
|
|
#include <process.h>
|
|
|
|
|
2024-09-21 15:07:22 +00:00
|
|
|
SDL_Thread *ThreadCreat(Thread_Func_t func, char *name, void *pArg) {
|
|
|
|
SDL_Thread *t = SDL_CreateThread(func, name, NULL);
|
|
|
|
if (!t) {
|
|
|
|
SDL_Log("CreateThread: %s", SDL_GetError);
|
|
|
|
return nullptr;
|
|
|
|
|
|
|
|
}
|
|
|
|
return t;
|
2024-06-22 14:51:58 +00:00
|
|
|
}
|
|
|
|
|
2024-09-21 15:07:22 +00:00
|
|
|
void ThreadStop(SDL_Thread *t) {
|
|
|
|
SDL_WaitThread(t, NULL);
|
2024-06-22 14:51:58 +00:00
|
|
|
}
|