Skip to content

Commit

Permalink
[core] fix a bug with hub assignation
Browse files Browse the repository at this point in the history
* Also improve detection for OCZ UFDs
* Closes #596
  • Loading branch information
pbatard committed Sep 14, 2015
1 parent 249d1ad commit c45ff77
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 14 deletions.
1 change: 0 additions & 1 deletion src/hdd_vs_ufd.h
Expand Up @@ -60,7 +60,6 @@ static str_score_t str_score[] = {
{ "MX#", 10 },
{ "WDC", 10 },
{ "IBM", 10 },
{ "OCZ", 5 },
{ "STM#", 10 },
{ "HDS#", 10 }, // These Hitachi drives are a PITA
{ "HDP#", 10 },
Expand Down
10 changes: 5 additions & 5 deletions src/rufus.rc
Expand Up @@ -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.736"
CAPTION "Rufus 2.4.737"
FONT 8, "Segoe UI Symbol", 400, 0, 0x0
BEGIN
LTEXT "Device",IDS_DEVICE_TXT,9,6,200,8
Expand Down Expand Up @@ -317,8 +317,8 @@ END
//

VS_VERSION_INFO VERSIONINFO
FILEVERSION 2,4,736,0
PRODUCTVERSION 2,4,736,0
FILEVERSION 2,4,737,0
PRODUCTVERSION 2,4,737,0
FILEFLAGSMASK 0x3fL
#ifdef _DEBUG
FILEFLAGS 0x1L
Expand All @@ -335,13 +335,13 @@ BEGIN
BEGIN
VALUE "CompanyName", "Akeo Consulting (http://akeo.ie)"
VALUE "FileDescription", "Rufus"
VALUE "FileVersion", "2.4.736"
VALUE "FileVersion", "2.4.737"
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.736"
VALUE "ProductVersion", "2.4.737"
END
END
BLOCK "VarFileInfo"
Expand Down
16 changes: 8 additions & 8 deletions src/usb.c
Expand Up @@ -137,9 +137,9 @@ static __inline BOOL IsVHD(const char* buffer)
/* For debugging user reports of HDDs vs UFDs */
//#define FORCED_DEVICE
#ifdef FORCED_DEVICE
#define FORCED_VID 0x090c
#define FORCED_PID 0x1000
#define FORCED_NAME "Samsung Flash Drive USB Device"
#define FORCED_VID 0x0930
#define FORCED_PID 0x6544
#define FORCED_NAME "TOSHIBA TransMemory USB Device"
#endif

/*
Expand Down Expand Up @@ -330,15 +330,15 @@ BOOL GetUSBDevices(DWORD devnum)

// Try to parse the current device_id string for VID:PID
// We'll use that if we can't get anything better
for (j = 0, k = 0; (j<strlen(device_id)) && (k<2); j++) {
for (k = 0, l = 0; (k<strlen(device_id)) && (l<2); k++) {
// The ID is in the form USB_VENDOR_BUSID\VID_xxxx&PID_xxxx\...
if (device_id[j] == '\\')
if (device_id[k] == '\\')
post_backslash = TRUE;
if (!post_backslash)
continue;
if (device_id[j] == '_') {
props.pid = (uint16_t)strtoul(&device_id[j + 1], NULL, 16);
if (k++ == 0)
if (device_id[k] == '_') {
props.pid = (uint16_t)strtoul(&device_id[k + 1], NULL, 16);
if (l++ == 0)
props.vid = props.pid;
}
}
Expand Down

0 comments on commit c45ff77

Please sign in to comment.