Skip to content

Commit

Permalink
Fix OpenRCT2#5889: Giant screenshot does not work while using OpenGL …
Browse files Browse the repository at this point in the history
…renderer
  • Loading branch information
IntelOrca committed May 1, 2019
1 parent 1ac26e5 commit f1bbc0a
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
1 change: 1 addition & 0 deletions distribution/changelog.txt
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
- Change: [#7877] Files are now sorted in logical rather than dictionary order.
- Change: [#8688] Move common actions from debug menu into cheats menu.
- Fix: [#5103] OpenGL: ride track preview not rendered.
- Fix: [#5889] Giant screenshot does not work while using OpenGL renderer.
- Fix: [#5579] Network desync immediately after connecting.
- Fix: [#5893] Looking at guest window tabs other than the main tab eventually causes assertion.
- Fix: [#5905] Urban Park merry-go-round has entrance and exit swapped (original bug).
Expand Down
5 changes: 5 additions & 0 deletions src/openrct2/interface/Screenshot.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand All @@ -31,6 +32,7 @@
#include <memory>

using namespace OpenRCT2;
using namespace OpenRCT2::Drawing;

uint8_t gScreenshotCountdown = 0;

Expand Down Expand Up @@ -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
Expand Down

0 comments on commit f1bbc0a

Please sign in to comment.