From 182f8c1f06cb9acee49b262e58c58b8d590796b7 Mon Sep 17 00:00:00 2001 From: David Cernat Date: Sun, 8 Oct 2017 06:17:53 +0300 Subject: [PATCH] [General] Print client version on startup --- apps/openmw/main.cpp | 25 +++++++++++++++++++++++-- components/openmw-mp/Utils.cpp | 2 +- 2 files changed, 24 insertions(+), 3 deletions(-) diff --git a/apps/openmw/main.cpp b/apps/openmw/main.cpp index 1421930e2..65a706c95 100644 --- a/apps/openmw/main.cpp +++ b/apps/openmw/main.cpp @@ -49,9 +49,11 @@ extern int is_debugger_attached(void); /* Start of tes3mp addition - Include the header of the logger added for multiplayer + Include additional headers for multiplayer purposes */ #include +#include +#include /* End of tes3mp addition */ @@ -207,7 +209,26 @@ bool parseOptions (int argc, char** argv, OMW::Engine& engine, Files::Configurat cfgMgr.readConfiguration(variables, desc); Version::Version v = Version::getOpenmwVersion(variables["resources"].as().toStdString()); - std::cout << v.describe() << std::endl; + + /* + Start of tes3mp addition + + Print the multiplayer version first + */ + Utils::printVersion("TES3MP client", TES3MP_VERSION, v.mCommitHash, TES3MP_PROTO_VERSION); + /* + End of tes3mp addition + */ + + /* + Start of tes3mp change (minor) + + Because there is no need to print the commit hash again, only print OpenMW's version + */ + std::cout << "OpenMW version " << v.mVersion << std::endl; + /* + End of tes3mp change (minor) + */ engine.setGrabMouse(!variables["no-grab"].as()); diff --git a/components/openmw-mp/Utils.cpp b/components/openmw-mp/Utils.cpp index ea5161b0a..a4a4b6e7b 100644 --- a/components/openmw-mp/Utils.cpp +++ b/components/openmw-mp/Utils.cpp @@ -164,7 +164,7 @@ void Utils::printVersion(std::string appName, std::string version, std::string c cout << "Unknown OS"; #endif cout << " "; -#ifdef __x86_64__ +#if defined(__x86_64__) || defined(_M_X64) cout << "64-bit"; #elif defined(__i386__) || defined(_M_I86) cout << "32-bit";