short term fix for editor/game mode/launcher tick times consistency (#1720)
Signed-off-by: amzn-sean <75276488+amzn-sean@users.noreply.github.com>
This commit is contained in:
+10
-23
@@ -2302,13 +2302,6 @@ int CCryEditApp::IdleProcessing(bool bBackgroundUpdate)
|
||||
|
||||
m_bPrevActive = bActive;
|
||||
|
||||
AZStd::chrono::system_clock::time_point now = AZStd::chrono::system_clock::now();
|
||||
static AZStd::chrono::system_clock::time_point lastUpdate = now;
|
||||
|
||||
AZStd::chrono::duration<float> delta = now - lastUpdate;
|
||||
|
||||
lastUpdate = now;
|
||||
|
||||
// Don't tick application if we're doing idle processing during an assert.
|
||||
const bool isErrorWindowVisible = (gEnv && gEnv->pSystem->IsAssertDialogVisible());
|
||||
if (isErrorWindowVisible)
|
||||
@@ -2320,30 +2313,24 @@ int CCryEditApp::IdleProcessing(bool bBackgroundUpdate)
|
||||
}
|
||||
else if (bActive || (bBackgroundUpdate && !bIsAppWindow))
|
||||
{
|
||||
if (GetIEditor()->IsInGameMode())
|
||||
{
|
||||
// Update Game
|
||||
GetIEditor()->GetGameEngine()->Update();
|
||||
}
|
||||
else
|
||||
{
|
||||
GetIEditor()->GetGameEngine()->Update();
|
||||
// Update Game
|
||||
GetIEditor()->GetGameEngine()->Update();
|
||||
|
||||
if (!GetIEditor()->IsInGameMode())
|
||||
{
|
||||
if (m_pEditor)
|
||||
{
|
||||
m_pEditor->Update();
|
||||
}
|
||||
|
||||
GetIEditor()->Notify(eNotify_OnIdleUpdate);
|
||||
}
|
||||
|
||||
// Since the rendering is done based on the eNotify_OnIdleUpdate, we should trigger a TickSystem as well.
|
||||
// To ensure that there's a system tick for every render done in Idle
|
||||
AZ::ComponentApplication* componentApplication = nullptr;
|
||||
AZ::ComponentApplicationBus::BroadcastResult(componentApplication, &AZ::ComponentApplicationRequests::GetApplication);
|
||||
if (componentApplication)
|
||||
{
|
||||
componentApplication->TickSystem();
|
||||
}
|
||||
AZ::ComponentApplication* componentApplication = nullptr;
|
||||
AZ::ComponentApplicationBus::BroadcastResult(componentApplication, &AZ::ComponentApplicationRequests::GetApplication);
|
||||
if (componentApplication)
|
||||
{
|
||||
componentApplication->TickSystem();
|
||||
}
|
||||
}
|
||||
else if (GetIEditor()->GetSystem() && GetIEditor()->GetSystem()->GetILog())
|
||||
|
||||
@@ -489,11 +489,6 @@ void MainWindow::Initialize()
|
||||
ActionOverrideRequestBus::Event(
|
||||
GetEntityContextId(), &ActionOverrideRequests::SetupActionOverrideHandler, this);
|
||||
|
||||
// This function only happens after we're pretty sure that the engine has successfully started - so now would be a good time to start ticking the message pumps/etc.
|
||||
AzToolsFramework::Ticker* ticker = new AzToolsFramework::Ticker(this);
|
||||
ticker->Start();
|
||||
connect(ticker, &AzToolsFramework::Ticker::Tick, this, &MainWindow::SystemTick);
|
||||
|
||||
AzToolsFramework::EditorEventsBus::Broadcast(&AzToolsFramework::EditorEvents::NotifyMainWindowInitialized, this);
|
||||
}
|
||||
|
||||
|
||||
@@ -8,6 +8,7 @@
|
||||
#include <RenderCommon.h>
|
||||
|
||||
#include <Atom/RHI/CpuProfiler.h>
|
||||
#include <Atom/RHI/RHIUtils.h>
|
||||
#include <Atom/RHI.Reflect/InputStreamLayoutBuilder.h>
|
||||
#include <Atom/Feature/Mesh/MeshFeatureProcessor.h>
|
||||
#include <Atom/Feature/ReflectionProbe/ReflectionProbeFeatureProcessor.h>
|
||||
@@ -526,7 +527,10 @@ namespace AZ
|
||||
}
|
||||
else
|
||||
{
|
||||
AZ_Error("MeshDataInstance::OnAssetReady", false, "Failed to create model instance for '%s'", asset.GetHint().c_str());
|
||||
//when running with null renderer, the RPI::Model::FindOrCreate(...) is expected to return nullptr, so suppress this error.
|
||||
AZ_Error(
|
||||
"MeshDataInstance::OnAssetReady", RHI::IsNullRenderer(), "Failed to create model instance for '%s'",
|
||||
asset.GetHint().c_str());
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user