Moves frame rendering function to CRenderer and combines with making screenshots.

Tested By: Stan
Differential Revision: https://code.wildfiregames.com/D4414
This was SVN commit r26166.
This commit is contained in:
vladislavbelov
2022-01-04 18:13:45 +00:00
parent 87b5c233c5
commit 5e3426794c
13 changed files with 425 additions and 422 deletions
+3 -15
View File
@@ -219,19 +219,12 @@ static InReaction MainInputHandler(const SDL_Event_* ev)
}
else if (hotkey == "screenshot")
{
WriteScreenshot(L".png");
g_Renderer.MakeScreenShotOnNextFrame(CRenderer::ScreenShotType::DEFAULT);
return IN_HANDLED;
}
else if (hotkey == "bigscreenshot")
{
int tiles = 4, tileWidth = 256, tileHeight = 256;
CFG_GET_VAL("screenshot.tiles", tiles);
CFG_GET_VAL("screenshot.tilewidth", tileWidth);
CFG_GET_VAL("screenshot.tileheight", tileHeight);
if (tiles > 0 && tileWidth > 0 && tileHeight > 0)
WriteBigScreenshot(L".bmp", tiles, tileWidth, tileHeight);
else
LOGWARNING("Invalid big screenshot size: tiles=%d tileWidth=%d tileHeight=%d", tiles, tileWidth, tileHeight);
g_Renderer.MakeScreenShotOnNextFrame(CRenderer::ScreenShotType::BIG);
return IN_HANDLED;
}
else if (hotkey == "togglefullscreen")
@@ -456,12 +449,7 @@ static void Frame()
if (g_SoundManager)
g_SoundManager->IdleTask();
if (ShouldRender())
{
Render();
g_VideoMode.GetBackendDevice()->Present();
}
g_Renderer.RenderFrame(true);
g_Profiler.Frame();