From 16c0e8e2a20f75ad34b3f5f24a8af97be65800dc Mon Sep 17 00:00:00 2001 From: Pete Batard Date: Fri, 23 Apr 2021 12:03:43 +0100 Subject: [PATCH] [misc] UFD vs HDD detection improvements --- res/appstore/Package.appxmanifest | 2 +- src/dev.c | 6 +++--- src/hdd_vs_ufd.h | 2 +- src/rufus.rc | 10 +++++----- src/smart.c | 2 +- 5 files changed, 11 insertions(+), 11 deletions(-) diff --git a/res/appstore/Package.appxmanifest b/res/appstore/Package.appxmanifest index 03d272fb..ccd6a2b4 100644 --- a/res/appstore/Package.appxmanifest +++ b/res/appstore/Package.appxmanifest @@ -11,7 +11,7 @@ + Version="3.14.1779.0" /> Rufus diff --git a/src/dev.c b/src/dev.c index 2a1f8972..62eaae65 100644 --- a/src/dev.c +++ b/src/dev.c @@ -419,9 +419,9 @@ BOOL GetOpticalMedia(IMG_SAVE* img_save) /* For debugging user reports of HDDs vs UFDs */ //#define FORCED_DEVICE #ifdef FORCED_DEVICE -#define FORCED_VID 0x0BDA -#define FORCED_PID 0x0306 -#define FORCED_NAME "SDXC Card" +#define FORCED_VID 0x048D +#define FORCED_PID 0x1234 +#define FORCED_NAME "VendorCo Disk USB Device" #endif /* diff --git a/src/hdd_vs_ufd.h b/src/hdd_vs_ufd.h index b3419c3d..54c2ec62 100644 --- a/src/hdd_vs_ufd.h +++ b/src/hdd_vs_ufd.h @@ -113,7 +113,7 @@ static vid_score_t vid_score[] = { { 0x0420, -5 }, // Chipsbank { 0x046d, -5 }, // Logitech { 0x0480, 5 }, // Toshiba - { 0x048d, -5 }, // ITE + { 0x048d, -10 }, // ITE { 0x04b4, 10 }, // Cypress { 0x04c5, 7 }, // Fujitsu { 0x04e8, 5 }, // Samsung diff --git a/src/rufus.rc b/src/rufus.rc index 83a4abaf..4c510708 100644 --- a/src/rufus.rc +++ b/src/rufus.rc @@ -33,7 +33,7 @@ LANGUAGE LANG_NEUTRAL, SUBLANG_NEUTRAL IDD_DIALOG DIALOGEX 12, 12, 232, 326 STYLE DS_SETFONT | DS_MODALFRAME | DS_CENTER | WS_MINIMIZEBOX | WS_POPUP | WS_CAPTION | WS_SYSMENU EXSTYLE WS_EX_ACCEPTFILES -CAPTION "Rufus 3.14.1778" +CAPTION "Rufus 3.14.1779" FONT 9, "Segoe UI Symbol", 400, 0, 0x0 BEGIN LTEXT "Drive Properties",IDS_DRIVE_PROPERTIES_TXT,8,6,53,12,NOT WS_GROUP @@ -395,8 +395,8 @@ END // VS_VERSION_INFO VERSIONINFO - FILEVERSION 3,14,1778,0 - PRODUCTVERSION 3,14,1778,0 + FILEVERSION 3,14,1779,0 + PRODUCTVERSION 3,14,1779,0 FILEFLAGSMASK 0x3fL #ifdef _DEBUG FILEFLAGS 0x1L @@ -414,13 +414,13 @@ BEGIN VALUE "Comments", "https://rufus.ie" VALUE "CompanyName", "Akeo Consulting" VALUE "FileDescription", "Rufus" - VALUE "FileVersion", "3.14.1778" + VALUE "FileVersion", "3.14.1779" VALUE "InternalName", "Rufus" VALUE "LegalCopyright", "© 2011-2021 Pete Batard (GPL v3)" VALUE "LegalTrademarks", "https://www.gnu.org/licenses/gpl-3.0.html" VALUE "OriginalFilename", "rufus-3.14.exe" VALUE "ProductName", "Rufus" - VALUE "ProductVersion", "3.14.1778" + VALUE "ProductVersion", "3.14.1779" END END BLOCK "VarFileInfo" diff --git a/src/smart.c b/src/smart.c index eb2a8253..5b1b8218 100644 --- a/src/smart.c +++ b/src/smart.c @@ -451,7 +451,7 @@ int IsHDD(DWORD DriveIndex, uint16_t vid, uint16_t pid, const char* strid) // Adjust the score depending on the size drive_size = GetDriveSize(DriveIndex); - if (drive_size > 400 * GB) + if (drive_size > 800 * GB) score += 10; else if (drive_size < 32 * GB) score -= 10;