@@ -32,10 +32,6 @@ namespace
32
32
if (path.find (' \0 ' ) != SString::npos)
33
33
return false ;
34
34
35
- if (path.Contains (" :" ) && !path.BeginsWith (" C:\\ " ) && !path.BeginsWith (" D:\\ " ) &&
36
- !path.BeginsWith (" E:\\ " ) && !path.BeginsWith (" F:\\ " ) && !path.BeginsWith (" G:\\ " ))
37
- return false ;
38
-
39
35
// Check for special characters
40
36
if (path.Contains (" \\\\ ?\\ " ) || path.Contains (" \\\\ .\\ " )|| // Device namespace paths
41
37
path.Contains (" %" ) || path.Contains (" $" ))
@@ -1459,36 +1455,24 @@ int LaunchGame(SString strCmdLine)
1459
1455
1460
1456
// Wait for game to exit
1461
1457
WriteDebugEvent (" Loader - Wait for game to exit" );
1462
- DWORD totalWaitTime = 0 ;
1463
-
1464
- while (status == WAIT_TIMEOUT && totalWaitTime < 3600000 ) // 1 hour max wait
1458
+ while (status == WAIT_TIMEOUT)
1465
1459
{
1466
1460
status = WaitForSingleObject (piLoadee.hProcess , 1500 );
1467
- totalWaitTime += 1500 ;
1468
1461
1469
- // Detect if stuck on quit
1462
+ // If core is closing and gta_sa.exe process memory usage is not changing, terminate
1470
1463
CStuckProcessDetector detector (piLoadee.hProcess , 5000 );
1471
1464
while (status == WAIT_TIMEOUT && WatchDogIsSectionOpen (" Q0" )) // Gets closed when quit is detected as frozen
1472
1465
{
1473
1466
if (detector.UpdateIsStuck ())
1474
1467
{
1475
1468
WriteDebugEvent (" Detected stuck process at quit" );
1476
- #ifndef MTA_DEBUG
1477
- TerminateProcess (piLoadee.hProcess , 1 );
1478
- status = WAIT_FAILED;
1479
- break ;
1480
- #endif
1481
- }
1482
- status = WaitForSingleObject (piLoadee.hProcess , 1000 ); // 1 second timeout
1483
- totalWaitTime += 1000 ;
1484
-
1485
- if (totalWaitTime >= 3600000 ) // 1 hour max wait
1486
- {
1487
- WriteDebugEvent (" Maximum wait time exceeded" );
1469
+ #ifndef MTA_DEBUG
1488
1470
TerminateProcess (piLoadee.hProcess , 1 );
1489
1471
status = WAIT_FAILED;
1490
1472
break ;
1473
+ #endif
1491
1474
}
1475
+ status = WaitForSingleObject (piLoadee.hProcess , 1000 );
1492
1476
}
1493
1477
}
1494
1478
0 commit comments