From 1173719dc8835e5a516d8daafcc9f5d96f8b5a44 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=CE=B6eh=20Matt?= <5415177+ZehMatt@users.noreply.github.com> Date: Sun, 27 Aug 2023 20:03:40 +0300 Subject: [PATCH 1/2] Fix #20739: Build version info leaving stray pixels when moving camera --- src/openrct2/title/TitleScreen.cpp | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/src/openrct2/title/TitleScreen.cpp b/src/openrct2/title/TitleScreen.cpp index 1a3f72b6cc..1fa0a184d8 100644 --- a/src/openrct2/title/TitleScreen.cpp +++ b/src/openrct2/title/TitleScreen.cpp @@ -448,12 +448,9 @@ void DrawOpenRCT2(DrawPixelInfo& dpi, const ScreenCoordsXY& screenCoords) // Write name and version information buffer += gVersionInfoFull; - GfxDrawString(dpi, screenCoords + ScreenCoordsXY(5, 5 - 13), buffer.c_str(), { COLOUR_BLACK }); - // Invalidate screen area + GfxDrawString(dpi, screenCoords + ScreenCoordsXY(5, 5 - 13), buffer.c_str(), { COLOUR_BLACK }); int16_t width = static_cast(GfxGetStringWidth(buffer, FontStyle::Medium)); - GfxSetDirtyBlocks( - { screenCoords, screenCoords + ScreenCoordsXY{ width, 30 } }); // 30 is an arbitrary height to catch both strings // Write platform information buffer.assign("{OUTLINE}{WHITE}"); @@ -461,5 +458,11 @@ void DrawOpenRCT2(DrawPixelInfo& dpi, const ScreenCoordsXY& screenCoords) buffer.append(" ("); buffer.append(OPENRCT2_ARCHITECTURE); buffer.append(")"); + GfxDrawString(dpi, screenCoords + ScreenCoordsXY(5, 5), buffer.c_str(), { COLOUR_BLACK }); + width = std::max(width, static_cast(GfxGetStringWidth(buffer, FontStyle::Medium))); + + // Invalidate screen area + GfxSetDirtyBlocks({ screenCoords - ScreenCoordsXY(0, 13), + screenCoords + ScreenCoordsXY{ width + 5, 30 } }); // 30 is an arbitrary height to catch both strings } From 55ce16ed30219380909e02b6bd630104878d2c75 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=CE=B6eh=20Matt?= <5415177+ZehMatt@users.noreply.github.com> Date: Sun, 27 Aug 2023 20:04:27 +0300 Subject: [PATCH 2/2] Update changelog.txt --- distribution/changelog.txt | 1 + 1 file changed, 1 insertion(+) diff --git a/distribution/changelog.txt b/distribution/changelog.txt index db197c1611..4863c7b2c5 100644 --- a/distribution/changelog.txt +++ b/distribution/changelog.txt @@ -40,6 +40,7 @@ - Fix: [#20659] Phantom rides remain when closing construction window while paused. - Fix: [#20684] Footpath additions getting removed by Miniature railway ghost elements. - Fix: [#20693] Incorrect information shown when hovering over station when another station before it was removed. +- Fix: [#20739] Build version info on title screen leaving stray pixels when the camera is moved. 0.4.5 (2023-05-08) ------------------------------------------------------------------------