1
0
mirror of https://github.com/OpenRCT2/OpenRCT2 synced 2026-01-22 06:23:04 +01:00

Fix #5889: Giant screenshot does not work while using OpenGL renderer

This commit is contained in:
Ted John
2019-05-01 23:01:46 +01:00
parent f842d8a693
commit 39123f68eb
2 changed files with 6 additions and 0 deletions

View File

@@ -17,6 +17,7 @@
#include "../core/Console.hpp"
#include "../core/Imaging.h"
#include "../drawing/Drawing.h"
#include "../drawing/X8DrawingEngine.h"
#include "../localisation/Localisation.h"
#include "../platform/platform.h"
#include "../util/Util.h"
@@ -31,6 +32,7 @@
#include <memory>
using namespace OpenRCT2;
using namespace OpenRCT2::Drawing;
uint8_t gScreenshotCountdown = 0;
@@ -293,6 +295,9 @@ void screenshot_giant()
dpi.zoom_level = 0;
dpi.bits = (uint8_t*)malloc(dpi.width * dpi.height);
auto drawingEngine = std::make_unique<X8DrawingEngine>(GetContext()->GetUiContext());
dpi.DrawingEngine = drawingEngine.get();
viewport_render(&dpi, &viewport, 0, 0, viewport.width, viewport.height);
// Get a free screenshot path