MCPcopy Create free account
hub / github.com/OpenTTD/OpenTTD / MakeSmallScreenshot

Function MakeSmallScreenshot

src/screenshot.cpp:173–180  ·  view source on GitHub ↗

Make a screenshot of the current screen. */

Source from the content-addressed store, hash-verified

171
172/** Make a screenshot of the current screen. */
173static bool MakeSmallScreenshot(bool crashlog)
174{
175 auto provider = GetScreenshotProvider();
176 if (provider == nullptr) return false;
177
178 return provider->MakeImage(MakeScreenshotName(SCREENSHOT_NAME, provider->GetName(), crashlog), CurrentScreenCallback, _screen.width, _screen.height,
179 BlitterFactory::GetCurrentBlitter()->GetScreenDepth(), _cur_palette.palette);
180}
181
182/**
183 * Configure a Viewport for rendering (a part of) the map into a screenshot.

Callers 1

RealMakeScreenshotFunction · 0.85

Calls 5

GetScreenshotProviderFunction · 0.85
MakeScreenshotNameFunction · 0.85
MakeImageMethod · 0.45
GetNameMethod · 0.45
GetScreenDepthMethod · 0.45

Tested by

no test coverage detected