From 2a0535d966a4f984f7ef5f21d7bedb6ef70782f2 Mon Sep 17 00:00:00 2001 From: Ted John Date: Tue, 27 Apr 2021 10:30:52 +0100 Subject: [PATCH] Fix #13986: OpenGL: Track preview, flip/rotate does not update thumbnail Invalidate SPR_TEMP so that it is not cached in the OpenGL drawing engine. --- distribution/changelog.txt | 1 + src/openrct2-ui/windows/TrackDesignPlace.cpp | 1 + 2 files changed, 2 insertions(+) diff --git a/distribution/changelog.txt b/distribution/changelog.txt index cc11962863..1c7ce73d2b 100644 --- a/distribution/changelog.txt +++ b/distribution/changelog.txt @@ -7,6 +7,7 @@ - Fix: [#11829] Visual glitches and crashes when using RCT1 assets from mismatched or corrupt CSG1.DAT and CSG1i.DAT files. - Fix: [#13581] Opening the Options menu causes a noticeable drop in FPS. - Fix: [#13894] Block brakes do not animate. +- Fix: [#13986] OpenGL: Track preview window, flip/rotate button do not update the thumbnail. - Fix: [#14315] Crash when trying to rename Air Powered Vertical Coaster in Korean. - Fix: [#14330] join_server uses default_port from config. - Fix: [#14493] [Plugin] isHidden only works for tile elements up to the first element with a base height of over 32. diff --git a/src/openrct2-ui/windows/TrackDesignPlace.cpp b/src/openrct2-ui/windows/TrackDesignPlace.cpp index 05fc98cfc6..4eca92295c 100644 --- a/src/openrct2-ui/windows/TrackDesignPlace.cpp +++ b/src/openrct2-ui/windows/TrackDesignPlace.cpp @@ -490,6 +490,7 @@ static void window_track_place_paint(rct_window* w, rct_drawpixelinfo* dpi) g1temp.width = TRACK_MINI_PREVIEW_WIDTH; g1temp.height = TRACK_MINI_PREVIEW_HEIGHT; gfx_set_g1_element(SPR_TEMP, &g1temp); + drawing_engine_invalidate_image(SPR_TEMP); gfx_draw_sprite(&clippedDpi, ImageId(SPR_TEMP, NOT_TRANSLUCENT(w->colours[0])), { 0, 0 }); }