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
This commit is contained in:
parent
23fa2296c3
commit
876b6a5006
1 changed files with 1 additions and 1 deletions
|
@ -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";
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue