Fix #9147: Delay making screenshots until the next draw tick as we may not access the video buffer from the game thread.

(cherry picked from commit 1f159f79de)
This commit is contained in:
Michael Lutz
2021-05-01 19:55:46 +02:00
committed by Jonathan G Rennison
parent 1b46ef756e
commit 2e6cadb005
3 changed files with 33 additions and 11 deletions

View File

@@ -33,7 +33,7 @@ void SetupScreenshotViewport(ScreenshotType t, struct Viewport *vp, uint32 width
bool MakeHeightmapScreenshot(const char *filename);
bool MakeSmallMapScreenshot(unsigned int width, unsigned int height, SmallMapWindow *window);
void MakeScreenshotWithConfirm(ScreenshotType t);
bool MakeScreenshot(ScreenshotType t, const char *name, uint32 width = 0, uint32 height = 0);
bool MakeScreenshot(ScreenshotType t, std::string name, uint32 width = 0, uint32 height = 0);
bool MakeMinimapWorldScreenshot(const char *name);
void SetScreenshotAuxiliaryText(const char *key, const char *value);
inline void ClearScreenshotAuxiliaryText() { SetScreenshotAuxiliaryText(nullptr, nullptr); }