Thread functions must have SDLCALL call convention

This commit is contained in:
Anonymous Maarten 2024-06-24 15:50:12 +02:00
parent 57e19688f3
commit edbc112002
2 changed files with 3 additions and 7 deletions

View File

@ -33,7 +33,7 @@ class MxThread {
virtual ~MxThread();
private:
static unsigned ThreadProc(void* p_thread);
static int SDLCALL ThreadProc(void* p_thread);
SDL_Thread* m_thread;
MxBool m_running; // 0x0c

View File

@ -28,11 +28,7 @@ MxResult MxThread::Start(MxS32 p_stack, MxS32 p_flag)
if (m_semaphore.Init(0, 1) == SUCCESS) {
const SDL_PropertiesID props = SDL_CreateProperties();
SDL_SetProperty(
props,
SDL_PROP_THREAD_CREATE_ENTRY_FUNCTION_POINTER,
(void*)MxThread::ThreadProc
);
SDL_SetProperty(props, SDL_PROP_THREAD_CREATE_ENTRY_FUNCTION_POINTER, (void*)MxThread::ThreadProc);
SDL_SetProperty(props, SDL_PROP_THREAD_CREATE_USERDATA_POINTER, this);
SDL_SetNumberProperty(props, SDL_PROP_THREAD_CREATE_STACKSIZE_NUMBER, p_stack << 2);
@ -60,7 +56,7 @@ void MxThread::Terminate()
}
// FUNCTION: LEGO1 0x100bf680
unsigned MxThread::ThreadProc(void* p_thread)
int MxThread::ThreadProc(void* p_thread)
{
return static_cast<MxThread*>(p_thread)->Run();
}