aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEugene Sandulenko2007-10-28 11:27:00 +0000
committerEugene Sandulenko2007-10-28 11:27:00 +0000
commitddb39090bc9c7a046805fc8f92ec127a42d6d022 (patch)
treece12b8e62c27f4306d168e9b91821025031c7e20
parent00e9ed51d9e39ad9c07e3dcd53053bc9a6c5a22e (diff)
downloadscummvm-rg350-ddb39090bc9c7a046805fc8f92ec127a42d6d022.tar.gz
scummvm-rg350-ddb39090bc9c7a046805fc8f92ec127a42d6d022.tar.bz2
scummvm-rg350-ddb39090bc9c7a046805fc8f92ec127a42d6d022.zip
Implement FR #1775044: "set extrapath from commandline"
svn-id: r29280
-rw-r--r--README1
-rw-r--r--base/commandLine.cpp10
2 files changed, 11 insertions, 0 deletions
diff --git a/README b/README
index 7d54e6af44..e266576a8f 100644
--- a/README
+++ b/README
@@ -735,6 +735,7 @@ arguments -- see the next section.
-c, --config=CONFIG Use alternate configuration file
-p, --path=PATH Path to where the game is installed
+ --extrapath=PATH Extra path to additional game data
-x, --save-slot[=NUM] Savegame slot to load (default: autosave)
-f, --fullscreen Force full-screen mode
-F, --no-fullscreen Force windowed mode
diff --git a/base/commandLine.cpp b/base/commandLine.cpp
index b8bb81a8d0..fb6c5f0b47 100644
--- a/base/commandLine.cpp
+++ b/base/commandLine.cpp
@@ -102,6 +102,7 @@ static const char HELP_STRING[] =
" acorn, amiga, atari, c64, fmtowns, nes, mac, pc,\n"
" pce, segacd, windows)\n"
" --savepath=PATH Path to where savegames are stored\n"
+ " --extrapath=PATH Extra path to additional game data\n"
" --soundfont=FILE Select the SoundFont for MIDI playback (only\n"
" supported by some MIDI drivers)\n"
" --multi-midi Enable combination Adlib and native MIDI\n"
@@ -471,6 +472,15 @@ Common::String parseCommandLine(Common::StringMap &settings, int argc, char **ar
}
END_OPTION
+ DO_LONG_OPTION("extrapath")
+ FilesystemNode path(option);
+ if (!path.exists()) {
+ usage("Non-existent extra path '%s'", option);
+ } else if (!path.isReadable()) {
+ usage("Non-readable extra path '%s'", option);
+ }
+ END_OPTION
+
DO_LONG_OPTION_INT("talkspeed")
END_OPTION