Skip to content

Commit

Permalink
[misc] fix default listing of Samsung DriveDroid devices
Browse files Browse the repository at this point in the history
* Closes #401
  • Loading branch information
pbatard committed Feb 10, 2015
1 parent e4e9e87 commit 0e16259
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 8 deletions.
3 changes: 3 additions & 0 deletions src/hdd_vs_ufd.h
Expand Up @@ -81,6 +81,9 @@ static str_score_t str_score[] = {
{ "MUSHKIN", -15 },
};

static str_score_t str_adjust[] = {
{ "Gadget", -10 },
};

/* The lists belows set a score according to VID & VID:PID
* These were constructed as follows:
Expand Down
16 changes: 8 additions & 8 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.0.611"
CAPTION "Rufus 2.0.612"
FONT 8, "Segoe UI", 400, 0, 0x1
BEGIN
DEFPUSHBUTTON "Start",IDC_START,127,339,50,14
Expand Down Expand Up @@ -157,7 +157,7 @@ END

IDD_DIALOG_XP DIALOGEX 12, 12, 242, 376
STYLE DS_SETFONT | DS_MODALFRAME | DS_CENTER | WS_MINIMIZEBOX | WS_POPUP | WS_CAPTION | WS_SYSMENU
CAPTION "Rufus 2.0.611"
CAPTION "Rufus 2.0.612"
FONT 8, "MS Shell Dlg", 400, 0, 0x1
BEGIN
DEFPUSHBUTTON "Start",IDC_START,127,339,50,14
Expand Down Expand Up @@ -283,7 +283,7 @@ END
IDD_DIALOG_RTL DIALOGEX 12, 12, 242, 376
STYLE DS_SETFONT | DS_MODALFRAME | DS_CENTER | WS_MINIMIZEBOX | WS_POPUP | WS_CAPTION | WS_SYSMENU
EXSTYLE WS_EX_RTLREADING | WS_EX_APPWINDOW | WS_EX_LAYOUTRTL
CAPTION "Rufus 2.0.611"
CAPTION "Rufus 2.0.612"
FONT 8, "Segoe UI", 400, 0, 0x1
BEGIN
DEFPUSHBUTTON "Start",IDC_START,127,339,50,14
Expand Down Expand Up @@ -415,7 +415,7 @@ END
IDD_DIALOG_RTL_XP DIALOGEX 12, 12, 242, 376
STYLE DS_SETFONT | DS_MODALFRAME | DS_CENTER | WS_MINIMIZEBOX | WS_POPUP | WS_CAPTION | WS_SYSMENU
EXSTYLE WS_EX_RTLREADING | WS_EX_APPWINDOW | WS_EX_LAYOUTRTL
CAPTION "Rufus 2.0.611"
CAPTION "Rufus 2.0.612"
FONT 8, "MS Shell Dlg", 400, 0, 0x1
BEGIN
DEFPUSHBUTTON "Start",IDC_START,127,339,50,14
Expand Down Expand Up @@ -671,8 +671,8 @@ END
//

VS_VERSION_INFO VERSIONINFO
FILEVERSION 2,0,611,0
PRODUCTVERSION 2,0,611,0
FILEVERSION 2,0,612,0
PRODUCTVERSION 2,0,612,0
FILEFLAGSMASK 0x3fL
#ifdef _DEBUG
FILEFLAGS 0x1L
Expand All @@ -689,13 +689,13 @@ BEGIN
BEGIN
VALUE "CompanyName", "Akeo Consulting (http://akeo.ie)"
VALUE "FileDescription", "Rufus"
VALUE "FileVersion", "2.0.611"
VALUE "FileVersion", "2.0.612"
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.0.611"
VALUE "ProductVersion", "2.0.612"
END
END
BLOCK "VarFileInfo"
Expand Down
7 changes: 7 additions & 0 deletions src/smart.c
Expand Up @@ -472,6 +472,13 @@ int IsHDD(DWORD DriveIndex, uint16_t vid, uint16_t pid, const char* strid)
}
}

// Adjust for oddball devices
if (strid != NULL) {
for (i=0; i<ARRAYSIZE(str_adjust); i++)
if (strstr(strid, str_adjust[i].name) != NULL)
score += str_adjust[i].score;
}

// Check against known VIDs
for (i=0; i<ARRAYSIZE(vid_score); i++) {
if (vid == vid_score[i].vid) {
Expand Down

0 comments on commit 0e16259

Please sign in to comment.