Merge branch 'GoaLitiuM-platform_tick_unthrottle'

This commit is contained in:
Wojtek Figat
2024-08-05 14:43:59 +02:00

View File

@@ -195,6 +195,12 @@ int32 Engine::Main(const Char* cmdLine)
// Use the same time for all ticks to improve synchronization
const double time = Platform::GetTimeSeconds();
// Update application (will gather data and other platform related events)
{
PROFILE_CPU_NAMED("Platform.Tick");
Platform::Tick();
}
// Update game logic
if (Time::OnBeginUpdate(time))
{
@@ -302,12 +308,6 @@ void Engine::OnUpdate()
UpdateCount++;
// Update application (will gather data and other platform related events)
{
PROFILE_CPU_NAMED("Platform.Tick");
Platform::Tick();
}
const auto mainWindow = MainWindow;
#if !USE_EDITOR