mirror of
https://github.com/pbatard/rufus.git
synced 2025-05-29 22:15:21 -04:00
[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:
parent
84c95598a0
commit
7ad71a34f8
3 changed files with 26 additions and 6 deletions
13
src/usb.c
13
src/usb.c
|
@ -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;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue