[core] fix detection of some SanDisk Extreme UFDs

* Also add a debug mode for troubleshooting user reports of HDDs vs UFDs
* Closes #593
This commit is contained in:
Pete Batard 2015-09-06 17:47:39 +01:00
parent 84c95598a0
commit 7ad71a34f8
3 changed files with 26 additions and 6 deletions

View file

@ -134,6 +134,14 @@ static __inline BOOL IsVHD(const char* buffer)
return FALSE;
}
/* For debugging user reports of HDDs vs UFDs */
//#define FORCED_DEVICE
#ifdef FORCED_DEVICE
#define FORCED_VID 0x174C
#define FORCED_PID 0x3074
#define FORCED_NAME "SanDisk Extreme USB Device"
#endif
/*
* Refresh the list of USB devices
*/
@ -356,6 +364,11 @@ BOOL GetUSBDevices(DWORD devnum)
dev_if_path.String[(uintptr_t)htab_devid.table[j].data]);
if (GetUSBProperties(dev_if_path.String[(uintptr_t)htab_devid.table[j].data], device_id, &props))
method_str = "";
#ifdef FORCED_DEVICE
props.vid = FORCED_VID;
props.pid = FORCED_PID;
safe_strcpy(buffer, sizeof(buffer), FORCED_NAME);
#endif
}
break;
}