aboutsummaryrefslogtreecommitdiff
path: root/gameDetector.cpp
diff options
context:
space:
mode:
authorNicolas Noble2002-04-27 22:12:36 +0000
committerNicolas Noble2002-04-27 22:12:36 +0000
commit28778e07f78d68bcd7e7976a94ba5345795684d2 (patch)
tree5fbfd78879c64a9d997ab6fca199a0b5cf26b582 /gameDetector.cpp
parent5b0d856a121cafc2410abce41bfae6488f9926c5 (diff)
downloadscummvm-rg350-28778e07f78d68bcd7e7976a94ba5345795684d2.tar.gz
scummvm-rg350-28778e07f78d68bcd7e7976a94ba5345795684d2.tar.bz2
scummvm-rg350-28778e07f78d68bcd7e7976a94ba5345795684d2.zip
More command line and config file bug fixes:
-) fixed the save of the gfx_mode -) fixed the help line for gfx_mode -) adding some error messages in the config file loading svn-id: r4118
Diffstat (limited to 'gameDetector.cpp')
-rw-r--r--gameDetector.cpp12
1 files changed, 10 insertions, 2 deletions
diff --git a/gameDetector.cpp b/gameDetector.cpp
index ca68669b3e..7e85131a56 100644
--- a/gameDetector.cpp
+++ b/gameDetector.cpp
@@ -49,7 +49,7 @@ static const char USAGE_STRING[] =
"\t-e<mode> - set music engine (see readme.txt for details)\n"
"\t-r - emulate roland mt32 instruments\n"
"\t-f - fullscreen mode\n"
- "\t-g<mode> - graphics mode (normal,2x,3x,2xsai,super2xsai,supereagle.advmame2x)\n"
+ "\t-g<mode> - graphics mode (normal,2x,3x,2xsai,super2xsai,supereagle,advmame2x)\n"
"\t-a - specify game is amiga version\n"
#if defined(UNIX) || defined(UNIX_X11)
"\t-w[<file>] - write to config file [~/.scummvmrc]\n"
@@ -92,15 +92,23 @@ void GameDetector::updateconfig()
_mt32emulate = true;
else
_mt32emulate = false;
+
+ if ((val = scummcfg->get("nosubtitles")))
+ if (!scumm_stricmp(val, "true"))
+ _noSubtitles = true;
+ else
+ _noSubtitles = false;
if ((val = scummcfg->get("music_driver")))
if (!parseMusicDriver(val)) {
+ printf("Error in the config file: invalid music_driver.\n");
printf(USAGE_STRING);
exit(-1);
}
if ((val = scummcfg->get("gfx_mode")))
if ((_gfx_mode = parseGraphicsMode(val)) == -1) {
+ printf("Error in the config file: invalid gfx_mode.\n");
printf(USAGE_STRING);
exit(-1);
}
@@ -169,7 +177,7 @@ void GameDetector::parseCommandLine(int argc, char **argv)
_gfx_mode = parseGraphicsMode(s);
if (_gfx_mode == -1)
goto ShowHelpAndExit;
- scummcfg->set("gfx_mode", _gfx_mode, "scummvm");
+ scummcfg->set("gfx_mode", s, "scummvm");
goto NextArg;
case 'l':
s = GET_VALUE();