1
1
forked from 0ad/0ad

Skips renderer resources preloading for screenshots.

This was SVN commit r27156.
This commit is contained in:
Vladislav Belov 2022-10-13 21:46:08 +00:00
parent f841c1fac0
commit 47aae99fbe

View File

@ -409,13 +409,6 @@ void CRenderer::RenderFrame(const bool needsPresent)
if (!ShouldRender())
return;
if (m_ShouldPreloadResourcesBeforeNextFrame)
{
m_ShouldPreloadResourcesBeforeNextFrame = false;
// We don't need to render logger for the preload.
RenderFrameImpl(true, false);
}
if (m_ScreenShotType == ScreenShotType::BIG)
{
RenderBigScreenShot(needsPresent);
@ -429,6 +422,13 @@ void CRenderer::RenderFrame(const bool needsPresent)
if (needsPresent)
g_VideoMode.GetBackendDevice()->AcquireNextBackbuffer();
if (m_ShouldPreloadResourcesBeforeNextFrame)
{
m_ShouldPreloadResourcesBeforeNextFrame = false;
// We don't need to render logger for the preload.
RenderFrameImpl(true, false);
}
RenderFrameImpl(true, true);
m->deviceCommandContext->Flush();