From 7feae96ceb0227a078ec41a0d9f77d4f745dcd58 Mon Sep 17 00:00:00 2001 From: notmatthewbeshay <92357869+NotMachow@users.noreply.github.com> Date: Mon, 16 Mar 2026 04:57:54 +1100 Subject: [PATCH] Use standard thread IDs in C4JThread --- Minecraft.World/Util/C4JThread.cpp | 6 ++++-- Minecraft.World/Util/C4JThread.h | 2 +- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/Minecraft.World/Util/C4JThread.cpp b/Minecraft.World/Util/C4JThread.cpp index 54e856a2a..7577e8d4d 100644 --- a/Minecraft.World/Util/C4JThread.cpp +++ b/Minecraft.World/Util/C4JThread.cpp @@ -113,8 +113,10 @@ C4JThread::C4JThread(C4JThreadStartFunc* startFunc, void* param, #else m_threadID = 0; m_threadHandle = 0; + DWORD threadID = 0; m_threadHandle = CreateThread(NULL, m_stackSize, entryPoint, this, - CREATE_SUSPENDED, &m_threadID); + CREATE_SUSPENDED, &threadID); + m_threadID = threadID; #endif EnterCriticalSection(&ms_threadListCS); ms_threadList.push_back(this); @@ -454,7 +456,7 @@ C4JThread* C4JThread::getCurrentThread() { #elif defined __PSVITA__ SceUID currThreadID = sceKernelGetThreadId(); #else - DWORD currThreadID = GetCurrentThreadId(); + std::uint32_t currThreadID = GetCurrentThreadId(); #endif //__PS3__ EnterCriticalSection(&ms_threadListCS); diff --git a/Minecraft.World/Util/C4JThread.h b/Minecraft.World/Util/C4JThread.h index 725fe5db3..c2a1b9b34 100644 --- a/Minecraft.World/Util/C4JThread.h +++ b/Minecraft.World/Util/C4JThread.h @@ -210,7 +210,7 @@ private: int m_priority; static SceInt32 entryPoint(SceSize argSize, void* pArgBlock); #else - DWORD m_threadID; + std::uint32_t m_threadID; HANDLE m_threadHandle; Event* m_completionFlag; static DWORD WINAPI entryPoint(LPVOID lpParam);