From e4ca44c915d7b94075a8c3899fc236c96c8a54f6 Mon Sep 17 00:00:00 2001 From: VoxelTek <53562267+VoxelTek@users.noreply.github.com> Date: Thu, 31 Jul 2025 11:18:47 +1000 Subject: [PATCH] Revert "Add potentially unnecessary threading stuff" This reverts commit 0787b2ebf821873e7ea04b4687176b292995a846. --- LEGO1/omni/include/mxthread.h | 10 +--------- LEGO1/omni/src/system/mxthread.cpp | 31 ------------------------------ 2 files changed, 1 insertion(+), 40 deletions(-) diff --git a/LEGO1/omni/include/mxthread.h b/LEGO1/omni/include/mxthread.h index d390c5d2..0772dc65 100644 --- a/LEGO1/omni/include/mxthread.h +++ b/LEGO1/omni/include/mxthread.h @@ -5,11 +5,7 @@ #include "mxsemaphore.h" #include "mxtypes.h" -#ifdef PS2 -#include -#else #include -#endif class MxCore; @@ -45,13 +41,9 @@ class MxThread { virtual ~MxThread(); private: -#ifdef PS2 - static int ThreadProc(void* p_thread); - int m_thread; -#else static int SDLCALL ThreadProc(void* p_thread); + SDL_Thread* m_thread; -#endif MxBool m_running; // 0x0c MxSemaphore m_semaphore; // 0x10 diff --git a/LEGO1/omni/src/system/mxthread.cpp b/LEGO1/omni/src/system/mxthread.cpp index dfdb89dc..307db15a 100644 --- a/LEGO1/omni/src/system/mxthread.cpp +++ b/LEGO1/omni/src/system/mxthread.cpp @@ -3,9 +3,6 @@ #include "decomp.h" #include -#ifdef PS2 -#include -#endif DECOMP_SIZE_ASSERT(MxThread, 0x1c) @@ -13,11 +10,7 @@ DECOMP_SIZE_ASSERT(MxThread, 0x1c) // FUNCTION: BETA10 0x10147540 MxThread::MxThread() { -#ifdef PS2 - m_thread = 0; -#else m_thread = NULL; -#endif m_running = TRUE; } @@ -26,13 +19,7 @@ MxThread::MxThread() MxThread::~MxThread() { if (m_thread) { -#ifdef PS2 - ReleaseWaitThread(m_thread); - DeleteThread(m_thread); - m_thread = 0; -#else SDL_WaitThread(m_thread, NULL); -#endif } } @@ -43,23 +30,6 @@ MxResult MxThread::Start(MxS32 p_stackSize, MxS32 p_flag) MxResult result = FAILURE; if (m_semaphore.Init(0, 1) != SUCCESS) { -#ifdef PS2 - ee_thread_t thread; - thread.func = (void*)&(MxThread::ThreadProc); - thread .stack_size = p_stackSize * 4; - thread.initial_priority = 0x18; - int thid = CreateThread(&thread); - - if (thid >= 0) { - MxThread* self = this; - int start = StartThread(thid, &self); - if (start >= 0) { - result = SUCCESS; - m_thread = thid; // store thread ID if needed - } - } - } -#else goto done; } @@ -75,7 +45,6 @@ MxResult MxThread::Start(MxS32 p_stackSize, MxS32 p_flag) SDL_DestroyProperties(props); } -#endif result = SUCCESS;