mirror of
https://github.com/isledecomp/isle-portable.git
synced 2026-02-03 12:31:15 +00:00
Thread functions must have SDLCALL call convention
This commit is contained in:
parent
57e19688f3
commit
edbc112002
@ -33,7 +33,7 @@ class MxThread {
|
|||||||
virtual ~MxThread();
|
virtual ~MxThread();
|
||||||
|
|
||||||
private:
|
private:
|
||||||
static unsigned ThreadProc(void* p_thread);
|
static int SDLCALL ThreadProc(void* p_thread);
|
||||||
|
|
||||||
SDL_Thread* m_thread;
|
SDL_Thread* m_thread;
|
||||||
MxBool m_running; // 0x0c
|
MxBool m_running; // 0x0c
|
||||||
|
|||||||
@ -28,11 +28,7 @@ MxResult MxThread::Start(MxS32 p_stack, MxS32 p_flag)
|
|||||||
|
|
||||||
if (m_semaphore.Init(0, 1) == SUCCESS) {
|
if (m_semaphore.Init(0, 1) == SUCCESS) {
|
||||||
const SDL_PropertiesID props = SDL_CreateProperties();
|
const SDL_PropertiesID props = SDL_CreateProperties();
|
||||||
SDL_SetProperty(
|
SDL_SetProperty(props, SDL_PROP_THREAD_CREATE_ENTRY_FUNCTION_POINTER, (void*)MxThread::ThreadProc);
|
||||||
props,
|
|
||||||
SDL_PROP_THREAD_CREATE_ENTRY_FUNCTION_POINTER,
|
|
||||||
(void*)MxThread::ThreadProc
|
|
||||||
);
|
|
||||||
SDL_SetProperty(props, SDL_PROP_THREAD_CREATE_USERDATA_POINTER, this);
|
SDL_SetProperty(props, SDL_PROP_THREAD_CREATE_USERDATA_POINTER, this);
|
||||||
SDL_SetNumberProperty(props, SDL_PROP_THREAD_CREATE_STACKSIZE_NUMBER, p_stack << 2);
|
SDL_SetNumberProperty(props, SDL_PROP_THREAD_CREATE_STACKSIZE_NUMBER, p_stack << 2);
|
||||||
|
|
||||||
@ -60,7 +56,7 @@ void MxThread::Terminate()
|
|||||||
}
|
}
|
||||||
|
|
||||||
// FUNCTION: LEGO1 0x100bf680
|
// FUNCTION: LEGO1 0x100bf680
|
||||||
unsigned MxThread::ThreadProc(void* p_thread)
|
int MxThread::ThreadProc(void* p_thread)
|
||||||
{
|
{
|
||||||
return static_cast<MxThread*>(p_thread)->Run();
|
return static_cast<MxThread*>(p_thread)->Run();
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user