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)
This commit is contained in:
Echo J. 2026-03-10 20:00:07 +02:00 committed by GitHub
parent 56245448d3
commit 8a8280b242
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -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
{