diff options
author | Torbjörn Andersson | 2015-05-30 19:18:29 +0200 |
---|---|---|
committer | Torbjörn Andersson | 2015-05-30 19:18:29 +0200 |
commit | a3008e8f010704207f39a857641be3d4c564ccb1 (patch) | |
tree | 62a9558e29bbd05aace9c2f08169b9964499f7dd /audio | |
parent | 1f7555c2ca753c4b68c3a53c651dead981e7b81d (diff) | |
download | scummvm-rg350-a3008e8f010704207f39a857641be3d4c564ccb1.tar.gz scummvm-rg350-a3008e8f010704207f39a857641be3d4c564ccb1.tar.bz2 scummvm-rg350-a3008e8f010704207f39a857641be3d4c564ccb1.zip |
FMOPL: Fix confusing "opl_driver" behavior
The way I've configured ScummVM, the default is to use FluidSynth
for MIDI, and any game where I want AdLib overrides that setting.
I have set the DOSBox OPL emulator as the default.
However, this causes the game's "opl_driver" setting to be "auto",
which overrides the default setting, and usually picks the MAME
OPL emulator. To counter this, if it sees that "opl_driver" is
"auto", it will check the default setting.
In other words, only use "auto" if "opl_driver" isn't set on any
level. I think this is the behaviour that should cause the least
amount of astonishment.
Diffstat (limited to 'audio')
-rw-r--r-- | audio/fmopl.cpp | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/audio/fmopl.cpp b/audio/fmopl.cpp index c18e544410..30229ea6bf 100644 --- a/audio/fmopl.cpp +++ b/audio/fmopl.cpp @@ -80,6 +80,12 @@ Config::DriverId Config::detect(OplType type) { } DriverId drv = parse(ConfMan.get("opl_driver")); + if (drv == kAuto) { + // Since the "auto" can be explicitly set for a game, and this + // driver shows up in the GUI as "<default>", check if there is + // a global setting for it before resorting to auto-detection. + drv = parse(ConfMan.get("opl_driver", Common::ConfigManager::kApplicationDomain)); + } // When a valid driver is selected, check whether it supports // the requested OPL chip. |