From 8a8280b24299ad69efabc7187feb25b406b91f55 Mon Sep 17 00:00:00 2001 From: "Echo J." Date: Tue, 10 Mar 2026 20:00:07 +0200 Subject: [PATCH] GameNetworkManager: Fix incorrect infinity value redefinition WaitForSingleObject() uses the maximum 32-bit value for specifying infinite timeout (while INFINITY might overflow that sized value back to 0) which caused the server wait event to not actually wait when compiled with Clang (and the game to be forever stuck on a black screen due to abnormal server state) --- .../Platform/Common/Network/GameNetworkManager.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Minecraft.Client/Platform/Common/Network/GameNetworkManager.cpp b/Minecraft.Client/Platform/Common/Network/GameNetworkManager.cpp index 5fa598f74..a62be6143 100644 --- a/Minecraft.Client/Platform/Common/Network/GameNetworkManager.cpp +++ b/Minecraft.Client/Platform/Common/Network/GameNetworkManager.cpp @@ -1108,7 +1108,7 @@ int CGameNetworkManager::ChangeSessionTypeThreadProc( void* lpParam ) app.SetXuiServerAction(ProfileManager.GetPrimaryPad(),eXuiServerAction_PauseServer,(void *)TRUE); // wait for the server to be in a non-ticking state - pServer->m_serverPausedEvent->WaitForSignal(INFINITY); + pServer->m_serverPausedEvent->WaitForSignal(INFINITE); #if defined(__PS3__) || defined(__ORBIS__) || defined __PSVITA__ // Swap these two messages around as one is too long to display at 480 @@ -1926,7 +1926,7 @@ void CGameNetworkManager::ServerReadyWait() { if (m_hServerReadyEvent != NULL) { - m_hServerReadyEvent->WaitForSignal(INFINITY); + m_hServerReadyEvent->WaitForSignal(INFINITE); } else { @@ -1990,7 +1990,7 @@ void CGameNetworkManager::ServerStoppedWait() { if (m_hServerStoppedEvent != NULL) { - m_hServerStoppedEvent->WaitForSignal(INFINITY); + m_hServerStoppedEvent->WaitForSignal(INFINITE); } else {