1
1
Fork 0
mirror of https://github.com/pbatard/rufus.git synced 2024-08-14 23:57:05 +00: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:
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

@ -78,8 +78,15 @@ static str_score_t str_score[] = {
{ "TOSHIBA", 5 },
{ "QUANTUM", 10 },
{ "EXCELSTOR", 10 },
{ "ADATA", -15 },
{ "CORSAIR", -15 },
{ "KINGMAX", -15 },
{ "KINGSTON", -15 },
{ "LEXAR", -15 },
{ "MUSHKIN", -15 },
{ "PNY", -15 },
{ "SANDISK", -15 },
{ "TRANSCEND", -15 },
};
static str_score_t str_adjust[] = {
@ -147,7 +154,7 @@ static vid_score_t vid_score[] = {
{ 0x1516, -5 }, // CompUSA
{ 0x152d, 10 }, // JMicron
{ 0x1687, -5 }, // Kingmax
{ 0x174c, 8 }, // ASMedia
{ 0x174c, 3 }, // ASMedia (also used by SanDisk)
{ 0x1759, 8 }, // LucidPort
{ 0x18a5, -2 }, // Verbatim
{ 0x18ec, -5 }, // Arkmicro

View file

@ -32,7 +32,7 @@ LANGUAGE LANG_NEUTRAL, SUBLANG_NEUTRAL
IDD_DIALOG DIALOGEX 12, 12, 242, 376
STYLE DS_SETFONT | DS_MODALFRAME | DS_CENTER | WS_MINIMIZEBOX | WS_POPUP | WS_CAPTION | WS_SYSMENU
CAPTION "Rufus 2.4.727"
CAPTION "Rufus 2.4.728"
FONT 8, "Segoe UI Symbol", 400, 0, 0x0
BEGIN
LTEXT "Device",IDS_DEVICE_TXT,9,6,200,8
@ -317,8 +317,8 @@ END
//
VS_VERSION_INFO VERSIONINFO
FILEVERSION 2,4,727,0
PRODUCTVERSION 2,4,727,0
FILEVERSION 2,4,728,0
PRODUCTVERSION 2,4,728,0
FILEFLAGSMASK 0x3fL
#ifdef _DEBUG
FILEFLAGS 0x1L
@ -335,13 +335,13 @@ BEGIN
BEGIN
VALUE "CompanyName", "Akeo Consulting (http://akeo.ie)"
VALUE "FileDescription", "Rufus"
VALUE "FileVersion", "2.4.727"
VALUE "FileVersion", "2.4.728"
VALUE "InternalName", "Rufus"
VALUE "LegalCopyright", "© 2011-2015 Pete Batard (GPL v3)"
VALUE "LegalTrademarks", "http://www.gnu.org/copyleft/gpl.html"
VALUE "OriginalFilename", "rufus.exe"
VALUE "ProductName", "Rufus"
VALUE "ProductVersion", "2.4.727"
VALUE "ProductVersion", "2.4.728"
END
END
BLOCK "VarFileInfo"

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;
}