From ef1e986a877d65c7db4065c9d846c95325bc50da Mon Sep 17 00:00:00 2001 From: Marc Zinnschlag Date: Thu, 5 May 2011 19:50:28 +0200 Subject: [PATCH] added --data-local switch --- apps/openmw/main.cpp | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/apps/openmw/main.cpp b/apps/openmw/main.cpp index 0545e5a98..8dff52024 100644 --- a/apps/openmw/main.cpp +++ b/apps/openmw/main.cpp @@ -46,6 +46,8 @@ bool parseOptions (int argc, char**argv, OMW::Engine& engine) ->default_value (std::vector(), "data") ->multitoken(), "set data directories (later directories have higher priority)") + ("data-local", bpo::value()->default_value (""), + "set local data directory (highest priority)") ("resources", bpo::value()->default_value ("resources"), "set resources directory") ("start", bpo::value()->default_value ("Beshara"), @@ -109,6 +111,11 @@ bool parseOptions (int argc, char**argv, OMW::Engine& engine) // directory settings std::vector dataDirs = variables["data"].as >(); std::vector dataDirs2 (dataDirs.begin(), dataDirs.end()); + + std::string local = variables["data-local"].as(); + if (!local.empty()) + dataDirs.push_back (local); + engine.setDataDirs (dataDirs2); engine.setResourceDir (variables["resources"].as());