r5sdk/r5dev/engine/sdk_dll.cpp
Kawe Mazidjatari fcf3a09418 Make singletons use static memory
Avoid heap memory allocation and a level of indirection. This allows the compiler to optimize the program even more. No logic has been changed in this patch.
2024-04-05 17:52:57 +02:00

31 lines
780 B
C++

//=============================================================================//
//
// Purpose:
//
//=============================================================================//
#include "core/stdafx.h"
#include "tier1/cvar.h"
#include "engine/sdk_dll.h"
#ifndef DEDICATED
#include "gameui/IBrowser.h"
#include "gameui/IConsole.h"
#endif // !DEDICATED
//-----------------------------------------------------------------------------
// Purpose:
//-----------------------------------------------------------------------------
void CEngineSDK::FixedFrame()
{
for (;;)
{
#ifndef DEDICATED
g_Browser.Think();
g_Console.Think();
#endif // !DEDICATED
std::this_thread::sleep_for(IntervalToDuration(sdk_fixedframe_tickinterval->GetFloat()));
}
}
CEngineSDK g_EngineSDK;