1
0
mirror of https://github.com/OpenRCT2/OpenRCT2 synced 2026-01-23 06:44:38 +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

@@ -318,7 +318,7 @@ void InGameConsole::Draw(DrawPixelInfo* dpi) const
{
const size_t index = i + _consoleScrollPos;
lineBuffer = _colourFormatStr + _consoleLines[index];
GfxDrawString(dpi, screenCoords, lineBuffer.c_str(), { textColour, InGameConsoleGetFontStyle() });
GfxDrawString(*dpi, screenCoords, lineBuffer.c_str(), { textColour, InGameConsoleGetFontStyle() });
screenCoords.y += lineHeight;
}
@@ -326,7 +326,7 @@ void InGameConsole::Draw(DrawPixelInfo* dpi) const
// Draw current line
lineBuffer = _colourFormatStr + _consoleCurrentLine;
DrawText(dpi, screenCoords, { TEXT_COLOUR_255, InGameConsoleGetFontStyle() }, lineBuffer.c_str(), true);
DrawText(*dpi, screenCoords, { TEXT_COLOUR_255, InGameConsoleGetFontStyle() }, lineBuffer.c_str(), true);
// Draw caret
if (_consoleCaretTicks < CONSOLE_CARET_FLASH_THRESHOLD)