aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJohannes Schickel2010-06-28 23:59:43 +0000
committerJohannes Schickel2010-06-28 23:59:43 +0000
commit876b6a50060bee23b4b05205a729014a8e5455b1 (patch)
tree6d2547c710cac12fc7e17726d5aed49190ba8ccc
parent23fa2296c3a3bc009b21684538e73e0520096e68 (diff)
downloadscummvm-rg350-876b6a50060bee23b4b05205a729014a8e5455b1.tar.gz
scummvm-rg350-876b6a50060bee23b4b05205a729014a8e5455b1.tar.bz2
scummvm-rg350-876b6a50060bee23b4b05205a729014a8e5455b1.zip
Prevent "music-driver" to be set to "" on startup.
This is a regression from r50158: "LAUNCHER: hopefully fixed music driver selection via command line". The problem here was that the code used operator[] of HashMap to check whether "music-driver" was specified on command line, but that on the other hand inserted a (key, value) pair with a default constructed Common::String as value. svn-id: r50469
-rw-r--r--base/main.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/base/main.cpp b/base/main.cpp
index 7ea5344ba2..a668c453d4 100644
--- a/base/main.cpp
+++ b/base/main.cpp
@@ -345,7 +345,7 @@ extern "C" int scummvm_main(int argc, const char * const argv[]) {
// If we received an invalid music parameter via command line we check this here.
// We can't check this before loading the music plugins.
// On the other hand we cannot load the plugins before we know the file paths (in case of external plugins).
- if (!settings["music-driver"].empty()) {
+ if (settings.contains("music-driver")) {
if (MidiDriver::getMusicType(MidiDriver::getDeviceHandle(settings["music-driver"])) == MT_NULL) {
warning("Unrecognized music driver '%s'\nSwitching to default device.", settings["music-driver"].c_str());
settings["music-driver"] = "auto";