diff --git a/src/openrct2-ui/windows/About.cpp b/src/openrct2-ui/windows/About.cpp index ef4ff8cbe6..e03aab27f8 100644 --- a/src/openrct2-ui/windows/About.cpp +++ b/src/openrct2-ui/windows/About.cpp @@ -199,12 +199,10 @@ namespace OpenRCT2::Ui::Windows ScreenCoordsXY logoCoords = windowPos + ScreenCoordsXY(widgets[WIDX_OPENRCT2_LOGO].left, widgets[WIDX_OPENRCT2_LOGO].top); GfxDrawSprite(dpi, ImageId(SPR_G2_LOGO), logoCoords); - // Version info - utf8 buffer[256]; - utf8* ch = buffer; - OpenRCT2WriteFullVersionInfo(ch, sizeof(buffer) - (ch - buffer)); + + u8string versionInfo = gVersionInfoFull; auto ft = Formatter(); - ft.Add(buffer); + ft.Add(versionInfo.c_str()); auto const& versionPlaceholder = widgets[WIDX_VERSION]; auto versionPlaceHolderWidth = versionPlaceholder.right - versionPlaceholder.left; diff --git a/src/openrct2/Context.cpp b/src/openrct2/Context.cpp index d19f79c02c..eac8d2b346 100644 --- a/src/openrct2/Context.cpp +++ b/src/openrct2/Context.cpp @@ -1566,11 +1566,6 @@ bool ContextLoadParkFromStream(void* stream) return GetContext()->LoadParkFromStream(static_cast(stream), ""); } -void OpenRCT2WriteFullVersionInfo(utf8* buffer, size_t bufferSize) -{ - String::Set(buffer, bufferSize, gVersionInfoFull); -} - void OpenRCT2Finish() { GetContext()->Finish(); diff --git a/src/openrct2/OpenRCT2.h b/src/openrct2/OpenRCT2.h index 9d72ea7e78..1f8729f611 100644 --- a/src/openrct2/OpenRCT2.h +++ b/src/openrct2/OpenRCT2.h @@ -60,7 +60,6 @@ extern uint8_t gScreenFlags; extern uint32_t gScreenAge; extern PromptMode gSavePromptMode; -void OpenRCT2WriteFullVersionInfo(utf8* buffer, size_t bufferSize); void OpenRCT2Finish(); int32_t CommandLineRun(const char** argv, int32_t argc); diff --git a/src/openrct2/command_line/RootCommands.cpp b/src/openrct2/command_line/RootCommands.cpp index 0092f76002..2fe5c348e0 100644 --- a/src/openrct2/command_line/RootCommands.cpp +++ b/src/openrct2/command_line/RootCommands.cpp @@ -447,9 +447,8 @@ static void PrintAbout() static void PrintVersion() { - char buffer[256]; - OpenRCT2WriteFullVersionInfo(buffer, sizeof(buffer)); - Console::WriteLine(buffer); + u8string versionInfo = gVersionInfoFull; + Console::WriteLine(versionInfo.c_str()); Console::WriteFormat("%s (%s)", OPENRCT2_PLATFORM, OPENRCT2_ARCHITECTURE); Console::WriteLine(); Console::WriteFormat("Network version: %s", NetworkGetVersion().c_str()); @@ -481,9 +480,8 @@ static void PrintLaunchInformation() struct tm* tmInfo; // Print name and version information - OpenRCT2WriteFullVersionInfo(buffer, sizeof(buffer)); - Console::WriteFormat("%s", buffer); - Console::WriteLine(); + u8string versionInfo = gVersionInfoFull; + Console::WriteLine(versionInfo.c_str()); Console::WriteFormat("%s (%s)", OPENRCT2_PLATFORM, OPENRCT2_ARCHITECTURE); Console::WriteLine(); Console::WriteLine();