diff options
author | Travis Howell | 2002-10-23 10:34:14 +0000 |
---|---|---|
committer | Travis Howell | 2002-10-23 10:34:14 +0000 |
commit | 319b37bd7b42af88c1f721855587c955243891e6 (patch) | |
tree | ad7c9f7f5df393c6603678cb6f21489784dc4ffa | |
parent | 134468fd619d36f2dca47a724c4e1cf01a930ee8 (diff) | |
download | scummvm-rg350-319b37bd7b42af88c1f721855587c955243891e6.tar.gz scummvm-rg350-319b37bd7b42af88c1f721855587c955243891e6.tar.bz2 scummvm-rg350-319b37bd7b42af88c1f721855587c955243891e6.zip |
Add command line option for master volume, patch #591813
svn-id: r5280
-rw-r--r-- | common/gameDetector.cpp | 9 | ||||
-rw-r--r-- | common/gameDetector.h | 1 |
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; |