diff options
author | Martin Ellis <malard@gmail.com> | 2011-06-11 21:28:06 +0100 |
---|---|---|
committer | Martin Ellis <malard@gmail.com> | 2011-06-12 15:43:06 +0100 |
commit | 755c63248575433ee89c0f3986767fe3f3336c2a (patch) | |
tree | 5dedae67f892ce58fae7921f11726e95ed723921 | |
parent | 08907e4536d4761efbc94d64bc4257482e8ad84b (diff) |
changed: only enumerate USB HID devices that are installed
-rw-r--r-- | xbmc/win32/WIN32USBScan.cpp | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/xbmc/win32/WIN32USBScan.cpp b/xbmc/win32/WIN32USBScan.cpp index eb4225db73..705149015d 100644 --- a/xbmc/win32/WIN32USBScan.cpp +++ b/xbmc/win32/WIN32USBScan.cpp @@ -1,12 +1,14 @@ #include <setupapi.h> #include "WIN32USBScan.h" +static GUID USB_HID_GUID = { 0x4D1E55B2, 0xF16F, 0x11CF, { 0x88, 0xCB, 0x00, 0x11, 0x11, 0x00, 0x00, 0x30 } }; + CWIN32USBScan::CWIN32USBScan() { HDEVINFO hDevInfo; SP_DEVINFO_DATA DeviceInfoData; - hDevInfo = SetupDiGetClassDevs(NULL, 0, 0, DIGCF_PRESENT | DIGCF_ALLCLASSES); + hDevInfo = SetupDiGetClassDevs(&USB_HID_GUID, 0, 0, DIGCF_PRESENT | DIGCF_DEVICEINTERFACE); DeviceInfoData.cbSize = sizeof(SP_DEVINFO_DATA); for (DWORD i = 0; SetupDiEnumDeviceInfo(hDevInfo, i, &DeviceInfoData); i++) { |