mirror of
https://github.com/pbatard/rufus.git
synced 2025-06-04 00:29:00 -04:00
[core] add a notice about MBR and >2TB partitions
* Also fix Boot Options not displaying when no drive is plugged in advanced mode
This commit is contained in:
parent
f98c243eb8
commit
5247ffa6ab
6 changed files with 51 additions and 30 deletions
26
src/rufus.c
26
src/rufus.c
|
@ -282,6 +282,9 @@ static void SetPartitionSchemeAndTargetSystem(BOOL only_target)
|
|||
}
|
||||
|
||||
if (!only_target) {
|
||||
// Override partition type selection to GPT for drives larger than 2TB
|
||||
if (SelectedDrive.DiskSize > 2 * TB)
|
||||
selected_pt = PARTITION_STYLE_GPT;
|
||||
// Try to reselect the current drive's partition scheme
|
||||
int preferred_pt = SelectedDrive.PartitionStyle;
|
||||
if (allowed_partition_scheme[PARTITION_STYLE_MBR])
|
||||
|
@ -2114,21 +2117,8 @@ static INT_PTR CALLBACK MainCallback(HWND hDlg, UINT message, WPARAM wParam, LPA
|
|||
set_selected_fs = (HIWORD(wParam) == CBN_SELCHANGE);
|
||||
fs = (int)ComboBox_GetItemData(hFileSystem, ComboBox_GetCurSel(hFileSystem));
|
||||
SetClusterSizes(fs);
|
||||
if (fs < 0) {
|
||||
EnableBootOptions(TRUE, TRUE);
|
||||
SetMBRProps();
|
||||
// Remove the SysLinux and ReactOS options if they exists
|
||||
if (ComboBox_GetItemData(hBootType, ComboBox_GetCount(hBootType)-1) == (BT_MAX-1)) {
|
||||
for (i=BT_SYSLINUX_V4; i<BT_MAX; i++)
|
||||
IGNORE_RETVAL(ComboBox_DeleteString(hBootType, ComboBox_GetCount(hBootType)-1));
|
||||
IGNORE_RETVAL(ComboBox_SetCurSel(hBootType, 1));
|
||||
}
|
||||
break;
|
||||
} else {
|
||||
// Try to keep track of user selection
|
||||
if (set_selected_fs)
|
||||
selected_fs = fs;
|
||||
}
|
||||
if (set_selected_fs && (fs > 0))
|
||||
selected_fs = fs;
|
||||
EnableMBRBootOptions(TRUE, FALSE);
|
||||
SetMBRProps();
|
||||
break;
|
||||
|
@ -2517,6 +2507,12 @@ static INT_PTR CALLBACK MainCallback(HWND hDlg, UINT message, WPARAM wParam, LPA
|
|||
if (wParam != 0)
|
||||
goto aborted_start;
|
||||
|
||||
if ((pt == PARTITION_STYLE_MBR) && (SelectedDrive.DiskSize > 2 * TB)) {
|
||||
if (MessageBoxExU(hMainDialog, lmprintf(MSG_134, SizeToHumanReadable(SelectedDrive.DiskSize - 2 * TB, FALSE, FALSE)),
|
||||
lmprintf(MSG_128, "MBR"), MB_YESNO | MB_ICONWARNING | MB_IS_RTL, selected_langid) != IDYES)
|
||||
goto aborted_start;
|
||||
}
|
||||
|
||||
if (!zero_drive) {
|
||||
// Display a warning about UDF formatting times
|
||||
if (fs == FS_UDF) {
|
||||
|
|
10
src/rufus.rc
10
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.5.1443"
|
||||
CAPTION "Rufus 3.5.1444"
|
||||
FONT 9, "Segoe UI Symbol", 400, 0, 0x0
|
||||
BEGIN
|
||||
LTEXT "Drive Properties",IDS_DRIVE_PROPERTIES_TXT,8,6,53,12,NOT WS_GROUP
|
||||
|
@ -394,8 +394,8 @@ END
|
|||
//
|
||||
|
||||
VS_VERSION_INFO VERSIONINFO
|
||||
FILEVERSION 3,5,1443,0
|
||||
PRODUCTVERSION 3,5,1443,0
|
||||
FILEVERSION 3,5,1444,0
|
||||
PRODUCTVERSION 3,5,1444,0
|
||||
FILEFLAGSMASK 0x3fL
|
||||
#ifdef _DEBUG
|
||||
FILEFLAGS 0x1L
|
||||
|
@ -413,13 +413,13 @@ BEGIN
|
|||
VALUE "Comments", "https://akeo.ie"
|
||||
VALUE "CompanyName", "Akeo Consulting"
|
||||
VALUE "FileDescription", "Rufus"
|
||||
VALUE "FileVersion", "3.5.1443"
|
||||
VALUE "FileVersion", "3.5.1444"
|
||||
VALUE "InternalName", "Rufus"
|
||||
VALUE "LegalCopyright", "© 2011-2018 Pete Batard (GPL v3)"
|
||||
VALUE "LegalTrademarks", "https://www.gnu.org/copyleft/gpl.html"
|
||||
VALUE "OriginalFilename", "rufus-3.5.exe"
|
||||
VALUE "ProductName", "Rufus"
|
||||
VALUE "ProductVersion", "3.5.1443"
|
||||
VALUE "ProductVersion", "3.5.1444"
|
||||
END
|
||||
END
|
||||
BLOCK "VarFileInfo"
|
||||
|
|
11
src/ui.c
11
src/ui.c
|
@ -68,14 +68,17 @@ static float previous_end;
|
|||
// Set the combo selection according to the data
|
||||
void SetComboEntry(HWND hDlg, int data)
|
||||
{
|
||||
int i;
|
||||
for (i = 0; i < ComboBox_GetCount(hDlg); i++) {
|
||||
int i, nb_entries = ComboBox_GetCount(hDlg);
|
||||
|
||||
if (nb_entries <= 0)
|
||||
return;
|
||||
for (i = 0; i < nb_entries; i++) {
|
||||
if (ComboBox_GetItemData(hDlg, i) == data) {
|
||||
IGNORE_RETVAL(ComboBox_SetCurSel(hDlg, i));
|
||||
break;
|
||||
return;
|
||||
}
|
||||
}
|
||||
if (i == ComboBox_GetCount(hDlg))
|
||||
if (i == nb_entries)
|
||||
IGNORE_RETVAL(ComboBox_SetCurSel(hDlg, 0));
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue