Improve engine responsiveness when not focused
This commit is contained in:
@@ -195,6 +195,12 @@ int32 Engine::Main(const Char* cmdLine)
|
|||||||
// Use the same time for all ticks to improve synchronization
|
// Use the same time for all ticks to improve synchronization
|
||||||
const double time = Platform::GetTimeSeconds();
|
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
|
// Update game logic
|
||||||
if (Time::OnBeginUpdate(time))
|
if (Time::OnBeginUpdate(time))
|
||||||
{
|
{
|
||||||
@@ -302,12 +308,6 @@ void Engine::OnUpdate()
|
|||||||
|
|
||||||
UpdateCount++;
|
UpdateCount++;
|
||||||
|
|
||||||
// Update application (will gather data and other platform related events)
|
|
||||||
{
|
|
||||||
PROFILE_CPU_NAMED("Platform.Tick");
|
|
||||||
Platform::Tick();
|
|
||||||
}
|
|
||||||
|
|
||||||
const auto mainWindow = MainWindow;
|
const auto mainWindow = MainWindow;
|
||||||
|
|
||||||
#if !USE_EDITOR
|
#if !USE_EDITOR
|
||||||
|
|||||||
Reference in New Issue
Block a user