[Scummvm-cvs-logs] SF.net SVN: scummvm:[50469] scummvm/trunk/base/main.cpp
lordhoto at users.sourceforge.net
lordhoto at users.sourceforge.net
Tue Jun 29 01:59:43 CEST 2010
Revision: 50469
http://scummvm.svn.sourceforge.net/scummvm/?rev=50469&view=rev
Author: lordhoto
Date: 2010-06-28 23:59:43 +0000 (Mon, 28 Jun 2010)
Log Message:
-----------
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.
Modified Paths:
--------------
scummvm/trunk/base/main.cpp
Modified: scummvm/trunk/base/main.cpp
===================================================================
--- scummvm/trunk/base/main.cpp 2010-06-28 23:41:43 UTC (rev 50468)
+++ scummvm/trunk/base/main.cpp 2010-06-28 23:59:43 UTC (rev 50469)
@@ -345,7 +345,7 @@
// 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";
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
More information about the Scummvm-git-logs
mailing list