aboutsummaryrefslogtreecommitdiff
path: root/base
diff options
context:
space:
mode:
authorEugene Sandulenko2007-10-28 11:27:00 +0000
committerEugene Sandulenko2007-10-28 11:27:00 +0000
commitddb39090bc9c7a046805fc8f92ec127a42d6d022 (patch)
treece12b8e62c27f4306d168e9b91821025031c7e20 /base
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
Diffstat (limited to 'base')
-rw-r--r--base/commandLine.cpp10
1 files changed, 10 insertions, 0 deletions
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