From e60f0e3b38c38004aa550dabbc616834c4da6875 Mon Sep 17 00:00:00 2001 From: Marc Zinnschlag Date: Thu, 5 May 2011 19:39:11 +0200 Subject: [PATCH] --data switch accepts multiple directories now --- apps/openmw/main.cpp | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/apps/openmw/main.cpp b/apps/openmw/main.cpp index 7eba8c303..0545e5a98 100644 --- a/apps/openmw/main.cpp +++ b/apps/openmw/main.cpp @@ -42,8 +42,10 @@ bool parseOptions (int argc, char**argv, OMW::Engine& engine) desc.add_options() ("help", "print help message") - ("data", bpo::value()->default_value ("data"), - "set data directory") + ("data", bpo::value >() + ->default_value (std::vector(), "data") + ->multitoken(), + "set data directories (later directories have higher priority)") ("resources", bpo::value()->default_value ("resources"), "set resources directory") ("start", bpo::value()->default_value ("Beshara"), @@ -105,9 +107,10 @@ bool parseOptions (int argc, char**argv, OMW::Engine& engine) } // directory settings - std::vector dataDirs; - dataDirs.push_back (variables["data"].as()); - engine.setDataDirs (dataDirs); + std::vector dataDirs = variables["data"].as >(); + std::vector dataDirs2 (dataDirs.begin(), dataDirs.end()); + engine.setDataDirs (dataDirs2); + engine.setResourceDir (variables["resources"].as()); // master and plugin