mirror of
https://github.com/Rockbox/rockbox.git
synced 2025-11-13 15:12:30 -05:00
rbutil: correct usb-id reading on windows.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@22562 a1c6a512-1295-4272-9138-f99709370657
This commit is contained in:
parent
2dbb424eb9
commit
624c608c9d
1 changed files with 3 additions and 2 deletions
|
|
@ -341,8 +341,9 @@ QMap<uint32_t, QString> System::listUsbDevices(void)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
unsigned int vid, pid, rev;
|
unsigned int vid, pid;
|
||||||
if(_stscanf(buffer, _TEXT("USB\\Vid_%x&Pid_%x&Rev_%x"), &vid, &pid, &rev) == 3) {
|
qDebug() << QString::fromWCharArray(buffer);
|
||||||
|
if(_stscanf(buffer, _TEXT("USB\\Vid_%x&Pid_%x"), &vid, &pid) == 2) {
|
||||||
uint32_t id;
|
uint32_t id;
|
||||||
id = vid << 16 | pid;
|
id = vid << 16 | pid;
|
||||||
usbids.insert(id, description);
|
usbids.insert(id, description);
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue