This commit is contained in:
AzaezelX 2020-12-22 14:33:44 -06:00
parent 52ecd8bb0f
commit 77fc164e96
675 changed files with 192770 additions and 60506 deletions

View file

@ -23,7 +23,6 @@
extern "C" {
#include "SDL_thread.h"
#include "SDL_systhread_c.h"
#include "SDL_log.h"
}
#include <system_error>

View file

@ -26,7 +26,6 @@ extern "C" {
#include "SDL_thread.h"
#include "../SDL_thread_c.h"
#include "../SDL_systhread.h"
#include "SDL_log.h"
}
#include <mutex>
@ -40,16 +39,16 @@ extern "C" {
static void
RunThread(void *args)
{
SDL_RunThread(args);
SDL_RunThread((SDL_Thread *) args);
}
extern "C"
int
SDL_SYS_CreateThread(SDL_Thread * thread, void *args)
SDL_SYS_CreateThread(SDL_Thread * thread)
{
try {
// !!! FIXME: no way to set a thread stack size here.
std::thread cpp_thread(RunThread, args);
std::thread cpp_thread(RunThread, thread);
thread->handle = (void *) new std::thread(std::move(cpp_thread));
return 0;
} catch (std::system_error & ex) {