From 58a290d8e9ccf5ca2e1337aeb5c5fd33d5faa440 Mon Sep 17 00:00:00 2001 From: Jonathan G Rennison Date: Mon, 30 Aug 2021 11:21:14 +0100 Subject: [PATCH] Include version label in output of -q switch --- src/openttd.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/openttd.cpp b/src/openttd.cpp index d9f3536a69..690e5efe43 100644 --- a/src/openttd.cpp +++ b/src/openttd.cpp @@ -297,6 +297,7 @@ static void ShowHelp() static void WriteSavegameInfo(const char *name) { extern SaveLoadVersion _sl_version; + extern std::string _sl_xv_version_label; uint32 last_ottd_rev = 0; byte ever_modified = 0; bool removed_newgrfs = false; @@ -315,6 +316,9 @@ static void WriteSavegameInfo(const char *name) type = " (extended)"; } p += seprintf(p, lastof(buf), "Savegame ver: %d%s\n", _sl_version, type); + if (!_sl_xv_version_label.empty()) { + p += seprintf(p, lastof(buf), " Version label: %s\n", _sl_xv_version_label.c_str()); + } for (size_t i = 0; i < XSLFI_SIZE; i++) { if (_sl_xv_feature_versions[i] > 0) { p += seprintf(p, lastof(buf), " Feature: %s = %d\n", SlXvGetFeatureName((SlXvFeatureIndex) i), _sl_xv_feature_versions[i]);