aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--common/gameDetector.cpp9
-rw-r--r--common/gameDetector.h1
2 files changed, 10 insertions, 0 deletions
diff --git a/common/gameDetector.cpp b/common/gameDetector.cpp
index ef46b8a2f6..8e759426d1 100644
--- a/common/gameDetector.cpp
+++ b/common/gameDetector.cpp
@@ -57,6 +57,7 @@ static const char USAGE_STRING[] =
"\t-l<file> - load config file instead of default\n"
"\t-m<num> - set music volume to <num> (0-100)\n"
"\t-n - no subtitles for speech\n"
+ "\t-o<num> - set master volume to <num> (0-255)\n"
"\t-p<path> - look for game in <path>\n"
"\t-s<num> - set sfx volume to <num> (0-255)\n"
"\t-t<num> - set music tempo (default- adlib: 0x1F0000, midi: 0x460000)\n"
@@ -79,6 +80,7 @@ GameDetector::GameDetector()
_use_adlib = false;
+ _master_volume = kDefaultMasterVolume;
_music_volume = kDefaultMusicVolume;
_sfx_volume = kDefaultSFXVolume;
_amiga = false;
@@ -150,6 +152,8 @@ void GameDetector::updateconfig()
exit(-1);
}
+ _master_volume = g_config->getInt("master_volume", _master_volume);
+
_music_volume = g_config->getInt("music_volume", _music_volume);
_noSubtitles = g_config->getBool("nosubtitles", _noSubtitles ? true : false);
@@ -271,6 +275,11 @@ void GameDetector::parseCommandLine(int argc, char **argv)
_noSubtitles = (c == 'n');
g_config->setBool("nosubtitles", _noSubtitles ? true : false);
break;
+ case 'o':
+ HANDLE_OPTION();
+ _master_volume = atoi(option);
+ g_config->setInt("master_volume", _master_volume);
+ break;
case 'p':
HANDLE_OPTION();
_gameDataPath = option;
diff --git a/common/gameDetector.h b/common/gameDetector.h
index 0a58030c86..f40441ada1 100644
--- a/common/gameDetector.h
+++ b/common/gameDetector.h
@@ -58,6 +58,7 @@ public:
int _music_volume;
int _sfx_volume;
+ int _master_volume;
bool _amiga;
uint16 _talkSpeed;