From 73e57f53a80fab9d99e64ef20093468475191300 Mon Sep 17 00:00:00 2001 From: scrawl Date: Sat, 31 Jan 2015 18:36:53 +0100 Subject: [PATCH] Always print openmw version in the log --- apps/openmw/main.cpp | 28 +++++++++++----------------- 1 file changed, 11 insertions(+), 17 deletions(-) diff --git a/apps/openmw/main.cpp b/apps/openmw/main.cpp index 74d434f63b..b96b90989c 100644 --- a/apps/openmw/main.cpp +++ b/apps/openmw/main.cpp @@ -190,29 +190,23 @@ bool parseOptions (int argc, char** argv, OMW::Engine& engine, Files::Configurat bpo::store(valid_opts, variables); bpo::notify(variables); - bool run = true; - if (variables.count ("help")) { std::cout << desc << std::endl; - run = false; + return false; } + std::cout << "OpenMW version " << OPENMW_VERSION; + std::string rev = OPENMW_VERSION_COMMITHASH; + std::string tag = OPENMW_VERSION_TAGHASH; + if (!rev.empty() && !tag.empty()) + { + rev = rev.substr(0, 10); + std::cout << " (revision " << rev << ")"; + } + std::cout << std::endl; + if (variables.count ("version")) - { - std::cout << "OpenMW version " << OPENMW_VERSION << std::endl; - - std::string rev = OPENMW_VERSION_COMMITHASH; - std::string tag = OPENMW_VERSION_TAGHASH; - if (!rev.empty() && !tag.empty()) - { - rev = rev.substr(0, 10); - std::cout << "Revision " << rev << std::endl; - } - run = false; - } - - if (!run) return false; cfgMgr.readConfiguration(variables, desc);