additions
This commit is contained in:
@@ -56,7 +56,6 @@ extern "C" void FunnyMain( int argc, char **argv )
|
||||
CommandLine()->CreateCommandLine(argc, argv);
|
||||
|
||||
EngineConsts_t stConstants = {};
|
||||
V_printf("------------ 1\n");
|
||||
#ifdef STEAM
|
||||
V_printf("Steam :)\n");
|
||||
if(SteamAPI_RestartAppIfNecessary(480))
|
||||
@@ -74,7 +73,7 @@ extern "C" void FunnyMain( int argc, char **argv )
|
||||
stConstants.LaunchServer = LaunchServerAtSteamRelay;
|
||||
stConstants.ConnectSteamServer = ConnectBySteamID;
|
||||
|
||||
//SteamNetworkingUtils()->SetDebugOutputFunction(k_ESteamNetworkingSocketsDebugOutputType_Debug, SteamAPIDebug);
|
||||
SteamNetworkingUtils()->SetDebugOutputFunction(k_ESteamNetworkingSocketsDebugOutputType_Msg, SteamAPIDebug);
|
||||
#endif
|
||||
stConstants.m_bIsDedicated = CommandLine()->CheckParam("-dedicated");
|
||||
stConstants.LaunchLocalBridge = LaunchLocalBridge;
|
||||
@@ -121,6 +120,15 @@ extern "C" void FunnyMain( int argc, char **argv )
|
||||
Console()->Execute();
|
||||
double fPrevious = Plat_GetTime();
|
||||
for (;;) {
|
||||
|
||||
if (!stConstants.m_bIsDedicated)
|
||||
{
|
||||
if (pWindow->IsValid() == false)
|
||||
{
|
||||
g_pWindowManager->DestroyWindow(pWindow);
|
||||
break;
|
||||
}
|
||||
}
|
||||
#ifdef STEAM
|
||||
SteamAPI_RunCallbacks();
|
||||
#endif
|
||||
@@ -149,7 +157,14 @@ extern "C" void FunnyMain( int argc, char **argv )
|
||||
|
||||
|
||||
fCurrent = Plat_GetTime();
|
||||
|
||||
};
|
||||
g_pClientGame->Shutdown();
|
||||
g_pServerGame->Shutdown();
|
||||
g_pRenderContext->Shutdown();
|
||||
|
||||
Console()->Shutdown();
|
||||
#ifdef STEAM
|
||||
SteamAPI_Shutdown();
|
||||
#endif
|
||||
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user