mirror of
https://github.com/OpenRCT2/OpenRCT2
synced 2025-12-23 15:52:55 +01:00
Merge pull request #20744 from ZehMatt/fix-20739
Fix #20739: Build version info leaving stray pixels when moving camera
This commit is contained in:
@@ -40,6 +40,7 @@
|
|||||||
- Fix: [#20659] Phantom rides remain when closing construction window while paused.
|
- Fix: [#20659] Phantom rides remain when closing construction window while paused.
|
||||||
- Fix: [#20684] Footpath additions getting removed by Miniature railway ghost elements.
|
- 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: [#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)
|
0.4.5 (2023-05-08)
|
||||||
------------------------------------------------------------------------
|
------------------------------------------------------------------------
|
||||||
|
|||||||
@@ -448,12 +448,9 @@ void DrawOpenRCT2(DrawPixelInfo& dpi, const ScreenCoordsXY& screenCoords)
|
|||||||
|
|
||||||
// Write name and version information
|
// Write name and version information
|
||||||
buffer += gVersionInfoFull;
|
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<int16_t>(GfxGetStringWidth(buffer, FontStyle::Medium));
|
int16_t width = static_cast<int16_t>(GfxGetStringWidth(buffer, FontStyle::Medium));
|
||||||
GfxSetDirtyBlocks(
|
|
||||||
{ screenCoords, screenCoords + ScreenCoordsXY{ width, 30 } }); // 30 is an arbitrary height to catch both strings
|
|
||||||
|
|
||||||
// Write platform information
|
// Write platform information
|
||||||
buffer.assign("{OUTLINE}{WHITE}");
|
buffer.assign("{OUTLINE}{WHITE}");
|
||||||
@@ -461,5 +458,11 @@ void DrawOpenRCT2(DrawPixelInfo& dpi, const ScreenCoordsXY& screenCoords)
|
|||||||
buffer.append(" (");
|
buffer.append(" (");
|
||||||
buffer.append(OPENRCT2_ARCHITECTURE);
|
buffer.append(OPENRCT2_ARCHITECTURE);
|
||||||
buffer.append(")");
|
buffer.append(")");
|
||||||
|
|
||||||
GfxDrawString(dpi, screenCoords + ScreenCoordsXY(5, 5), buffer.c_str(), { COLOUR_BLACK });
|
GfxDrawString(dpi, screenCoords + ScreenCoordsXY(5, 5), buffer.c_str(), { COLOUR_BLACK });
|
||||||
|
width = std::max(width, static_cast<int16_t>(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
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user