1
0
forked from mirrors/0ad

Skips renderer resources preloading for screenshots.

This was SVN commit r27156.
This commit is contained in:
vladislavbelov
2022-10-13 21:46:08 +00:00
parent f841c1fac0
commit 47aae99fbe
+7 -7
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();