Integrating up through commit 90f050496

This commit is contained in:
alexpete
2021-04-07 14:03:29 -07:00
parent 8f2ed080a9
commit c2cbd430fe
2694 changed files with 285622 additions and 176874 deletions
+1 -18
View File
@@ -1501,7 +1501,7 @@ bool CSystem::UpdatePreTickBus(int updateFlags, int nPauseMode)
if (maxFPS == 0 && vSync == 0)
{
ILevelSystem* pLvlSys = GetILevelSystem();
const bool inLevel = pLvlSys && pLvlSys->GetCurrentLevel() != 0;
const bool inLevel = pLvlSys && pLvlSys->IsLevelLoaded();
maxFPS = !inLevel || IsPaused() ? 60 : 0;
}
@@ -1791,23 +1791,6 @@ bool CSystem::UpdatePostTickBus(int updateFlags, int nPauseMode)
GetIViewSystem()->Update(min(gEnv->pTimer->GetFrameTime(), 0.1f));
}
if (gEnv->pLyShine)
{
// Tell the UI system the size of the viewport we are rendering to - this drives the
// canvas size for full screen UI canvases. It needs to be set before either pLyShine->Update or
// pLyShine->Render are called. It must match the viewport size that the input system is using.
AZ::Vector2 viewportSize;
viewportSize.SetX(static_cast<float>(gEnv->pRenderer->GetOverlayWidth()));
viewportSize.SetY(static_cast<float>(gEnv->pRenderer->GetOverlayHeight()));
gEnv->pLyShine->SetViewportSize(viewportSize);
bool isUiPaused = gEnv->pTimer->IsTimerPaused(ITimer::ETIMER_UI);
if (!isUiPaused)
{
gEnv->pLyShine->Update(gEnv->pTimer->GetFrameTime(ITimer::ETIMER_UI));
}
}
// Begin occlusion job after setting the correct camera.
gEnv->p3DEngine->PrepareOcclusion(GetViewCamera());