summaryrefslogtreecommitdiffstats
path: root/rbutil/rbutilqt/rbsettings.cpp
diff options
context:
space:
mode:
authorDominik Riebeling <Dominik.Riebeling@gmail.com>2008-04-03 23:14:58 +0000
committerDominik Riebeling <Dominik.Riebeling@gmail.com>2008-04-03 23:14:58 +0000
commit5f5dca72a9eef9923280bb05adb04a572e040f79 (patch)
treeb94277e5baa8f1853196f2447c80c45c6fc46813 /rbutil/rbutilqt/rbsettings.cpp
parentb411ce677dfcafbda09d1520c6dcbab544479ec1 (diff)
downloadrockbox-5f5dca72a9eef9923280bb05adb04a572e040f79.tar.gz
rockbox-5f5dca72a9eef9923280bb05adb04a572e040f79.tar.bz2
rockbox-5f5dca72a9eef9923280bb05adb04a572e040f79.zip
Make USB ID handling recognize multiple values in the configuration. That way players using multiple PIDs can now get detected by any valid PID. Same applies to PIDs indicating a wrong player model.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@16958 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'rbutil/rbutilqt/rbsettings.cpp')
-rw-r--r--rbutil/rbutilqt/rbsettings.cpp15
1 files changed, 9 insertions, 6 deletions
diff --git a/rbutil/rbutilqt/rbsettings.cpp b/rbutil/rbutilqt/rbsettings.cpp
index 8782e53a26..fd74cbb2b5 100644
--- a/rbutil/rbutilqt/rbsettings.cpp
+++ b/rbutil/rbutilqt/rbsettings.cpp
@@ -425,11 +425,13 @@ QMap<int, QString> RbSettings::usbIdMap()
QString target = devices->value(platforms.at(i)).toString();
devices->endGroup();
devices->beginGroup(target);
- if(!devices->value("usbid").toString().isEmpty())
- map.insert(devices->value("usbid").toString().toInt(0, 16), target);
+ QStringList ids = devices->value("usbid").toStringList();
+ int j = ids.size();
+ while(j--)
+ map.insert(ids.at(j).toInt(0, 16), target);
+
devices->endGroup();
}
-
return map;
}
@@ -449,11 +451,12 @@ QMap<int, QString> RbSettings::usbIdErrorMap()
QString target = devices->value(platforms.at(i)).toString();
devices->endGroup();
devices->beginGroup(target);
- if(!devices->value("usberror").toString().isEmpty())
- map.insert(devices->value("usberror").toString().toInt(0, 16), target);
+ QStringList ids = devices->value("usberror").toStringList();
+ int j = ids.size();
+ while(j--)
+ map.insert(ids.at(j).toInt(0, 16), target);
devices->endGroup();
}
-
return map;
}