summaryrefslogtreecommitdiff
path: root/rbutil/rbutilqt/base/system.cpp
diff options
context:
space:
mode:
authorDominik Wenger <domonoky@googlemail.com>2009-08-30 20:05:51 +0000
committerDominik Wenger <domonoky@googlemail.com>2009-08-30 20:05:51 +0000
commit624c608c9d67e39ed56977b8d09b0885d1cec0cb (patch)
tree92a3e6eb94da89f70a700328aed6416a596a17dd /rbutil/rbutilqt/base/system.cpp
parent2dbb424eb934bfb5516aef96d541098348c058a0 (diff)
rbutil: correct usb-id reading on windows.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@22562 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'rbutil/rbutilqt/base/system.cpp')
-rw-r--r--rbutil/rbutilqt/base/system.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/rbutil/rbutilqt/base/system.cpp b/rbutil/rbutilqt/base/system.cpp
index 054f1c59ef..de974a7544 100644
--- a/rbutil/rbutilqt/base/system.cpp
+++ b/rbutil/rbutilqt/base/system.cpp
@@ -341,8 +341,9 @@ QMap<uint32_t, QString> System::listUsbDevices(void)
}
}
- unsigned int vid, pid, rev;
- if(_stscanf(buffer, _TEXT("USB\\Vid_%x&Pid_%x&Rev_%x"), &vid, &pid, &rev) == 3) {
+ unsigned int vid, pid;
+ qDebug() << QString::fromWCharArray(buffer);
+ if(_stscanf(buffer, _TEXT("USB\\Vid_%x&Pid_%x"), &vid, &pid) == 2) {
uint32_t id;
id = vid << 16 | pid;
usbids.insert(id, description);