diff options
author | Dominik Wenger <domonoky@googlemail.com> | 2009-08-30 20:05:51 +0000 |
---|---|---|
committer | Dominik Wenger <domonoky@googlemail.com> | 2009-08-30 20:05:51 +0000 |
commit | 624c608c9d67e39ed56977b8d09b0885d1cec0cb (patch) | |
tree | 92a3e6eb94da89f70a700328aed6416a596a17dd /rbutil/rbutilqt/base/system.cpp | |
parent | 2dbb424eb934bfb5516aef96d541098348c058a0 (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.cpp | 5 |
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); |