mirror of
https://github.com/Mauler125/r5sdk.git
synced 2025-02-09 19:15:03 +01:00
System: handle other close events as well
Give the engine and SDK time to shutdown properly.
This commit is contained in:
parent
a809816f70
commit
0d1104bc0e
@ -56,6 +56,8 @@ ConsoleHandlerRoutine(
|
||||
{
|
||||
switch (eventCode)
|
||||
{
|
||||
case CTRL_C_EVENT:
|
||||
case CTRL_BREAK_EVENT:
|
||||
case CTRL_CLOSE_EVENT:
|
||||
case CTRL_LOGOFF_EVENT:
|
||||
case CTRL_SHUTDOWN_EVENT:
|
||||
@ -64,7 +66,9 @@ ConsoleHandlerRoutine(
|
||||
g_pHostState->m_iNextState = HostStates_t::HS_SHUTDOWN;
|
||||
}
|
||||
|
||||
Sleep(10000);
|
||||
// Give it time to shutdown properly, value is set to the max possible
|
||||
// of SPI_GETWAITTOKILLSERVICETIMEOUT, which is 20000ms by default.
|
||||
Sleep(20000);
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user