aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJohannes Schickel2010-07-04 17:40:06 +0000
committerJohannes Schickel2010-07-04 17:40:06 +0000
commit8f2c0c2ff0ab33315e04bb49cb98ece01fb4bd7f (patch)
tree0042af16f23b112cb5b4d3ed657cb4ade8cdb9f4
parent6c9e3b01da554b44bd8d5adac11f95ae3aa52599 (diff)
downloadscummvm-rg350-8f2c0c2ff0ab33315e04bb49cb98ece01fb4bd7f.tar.gz
scummvm-rg350-8f2c0c2ff0ab33315e04bb49cb98ece01fb4bd7f.tar.bz2
scummvm-rg350-8f2c0c2ff0ab33315e04bb49cb98ece01fb4bd7f.zip
Cleanup.
svn-id: r50647
-rw-r--r--gui/options.cpp10
1 files changed, 3 insertions, 7 deletions
diff --git a/gui/options.cpp b/gui/options.cpp
index ceb5073576..65a79dedb8 100644
--- a/gui/options.cpp
+++ b/gui/options.cpp
@@ -136,10 +136,6 @@ void OptionsDialog::init() {
}
}
-template<class T> bool equalsDeviceProperty(MusicDevices::iterator d, T lookupProp, Common::MemFunc0<T, MusicDevice> devicePropFunc) {
- return lookupProp == devicePropFunc(&*d);
-}
-
bool musicDeviceSkipSettingDefault(MusicDevices::iterator d, Common::String dom, MusicPlugin::List::const_iterator &m, uint32 guio) {
return (dom == Common::ConfigManager::kApplicationDomain && d->getMusicType() != MT_TOWNS) || (dom != Common::ConfigManager::kApplicationDomain && (!(guio & MidiDriver::musicType2GUIO((uint32)-1)) || (guio & (MidiDriver::musicType2GUIO(d->getMusicType()))))) || d->getMusicDriverId() == "auto" || d->getMusicDriverId() == "null" ? true : false;
}
@@ -810,9 +806,9 @@ bool OptionsDialog::loadMusicDeviceSetting(PopUpWidget *popup, Common::String se
for (MusicPlugin::List::const_iterator m = p.begin(); m != p.end() && id != -1; m++) {
MusicDevices i = (**m)->getDevices();
for (MusicDevices::iterator d = i.begin(); d != i.end(); d++) {
- if ((setting.empty()) ? equalsDeviceProperty(d, preferredType, Common::mem_fun(&MusicDevice::getMusicType)) : equalsDeviceProperty(d, drv, Common::mem_fun(&MusicDevice::getCompleteId))) {
+ if (setting.empty() ? (preferredType == d->getMusicType()) : (drv == d->getCompleteId())) {
popup->setSelected(id);
- id = -1;
+ id = -1;
break;
} else if (skipfunc(d, _domain, m, _guioptions)) {
id++;
@@ -821,7 +817,7 @@ bool OptionsDialog::loadMusicDeviceSetting(PopUpWidget *popup, Common::String se
}
if (id != -1)
// midi device turned off or whatever
- return false;
+ return false;
} else {
return false;
}