1
0
mirror of https://github.com/OpenRCT2/OpenRCT2 synced 2026-02-01 19:25:12 +01:00

Pass DPI by ref to string drawing

This commit is contained in:
Gymnasiast
2023-02-24 22:05:07 +01:00
parent 777fea6c8c
commit a15f72da87
75 changed files with 635 additions and 636 deletions

View File

@@ -448,7 +448,7 @@ 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 });
GfxDrawString(*dpi, screenCoords + ScreenCoordsXY(5, 5 - 13), buffer.c_str(), { COLOUR_BLACK });
// Invalidate screen area
int16_t width = static_cast<int16_t>(GfxGetStringWidth(buffer, FontStyle::Medium));
@@ -461,5 +461,5 @@ 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 });
GfxDrawString(*dpi, screenCoords + ScreenCoordsXY(5, 5), buffer.c_str(), { COLOUR_BLACK });
}