Skip to content

Commit

Permalink
fixed/win32: HID devices were displayed twice in the peripherals wind…
Browse files Browse the repository at this point in the history
…ow. fixed by scanning for RAW guid only. devices will be displayed with type 'unknown', but since the same device has a different guid when scanning the HID guid than when it's found by scanning the RAW guid and none of the other values except vendor id and product id match, this seems to be the only solution
  • Loading branch information
opdenkamp committed Oct 18, 2011
1 parent 31595d0 commit 30734ca
Showing 1 changed file with 4 additions and 10 deletions.
14 changes: 4 additions & 10 deletions xbmc/peripherals/bus/win32/PeripheralBusUSB.cpp
Expand Up @@ -40,16 +40,10 @@ CPeripheralBusUSB::CPeripheralBusUSB(CPeripherals *manager) :

bool CPeripheralBusUSB::PerformDeviceScan(PeripheralScanResults &results)
{
bool bReturn(true);

/* add device scans for non-generic devices here */

bReturn |= PerformDeviceScan(&USB_HID_GUID, PERIPHERAL_HID, results);
//disabled scanning for disks, since nothing is being done with them
// bReturn |= PerformDeviceScan(&USB_DISK_GUID, PERIPHERAL_DISK, results);
bReturn |= PerformDeviceScan(&USB_RAW_GUID, PERIPHERAL_UNKNOWN, results);

return bReturn;
/* XXX we'll just scan the RAW guid and find all devices. they'll show up as type 'unknown' in the UI,
but the other option is that they're detected more than once, because RAW will return all devices.
we have to scan the RAW guid here, because not every device is found by it's GUID correctly, e.g. CDC adapters. */
return PerformDeviceScan(&USB_RAW_GUID, PERIPHERAL_UNKNOWN, results);
}

bool CPeripheralBusUSB::PerformDeviceScan(const GUID *guid, const PeripheralType type, PeripheralScanResults &results)
Expand Down

0 comments on commit 30734ca

Please sign in to comment.