mirror of
https://github.com/pbatard/rufus.git
synced 2025-05-25 12:14:33 -04:00
[ui] add experimental optional display of transfer speed and time remaining
* You can use <Alt> to switch modes during an operation that supports it (e.g. Checksum computation, DD image writing or zeroing, save to VHD, download, etc. * IMPORTANT: This is *NOT* available for all operations. Especially, if you were hoping to get transfer speed or ETA during ISO or WIM extraction, you *WILL* be disappointed. * Also harmonize the code in checksum.c
This commit is contained in:
parent
94e2015edf
commit
af95de8198
16 changed files with 525 additions and 430 deletions
16
src/rufus.c
16
src/rufus.c
|
@ -2870,6 +2870,7 @@ int WINAPI WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR lpCmdLine
|
|||
FILE* fd;
|
||||
BOOL attached_console = FALSE, external_loc_file = FALSE, lgp_set = FALSE, automount = TRUE;
|
||||
BOOL disable_hogger = FALSE, previous_enable_HDDs = FALSE, vc = IsRegistryNode(REGKEY_HKCU, vs_reg);
|
||||
BOOL alt_pressed = FALSE, alt_command = FALSE;
|
||||
BYTE *loc_data;
|
||||
DWORD loc_size, size;
|
||||
char tmp_path[MAX_PATH] = "", loc_file[MAX_PATH] = "", ini_path[MAX_PATH] = "", ini_flags[] = "rb";
|
||||
|
@ -3245,6 +3246,12 @@ relaunch:
|
|||
// ** ***** **** ** **********
|
||||
// .,ABCDEFGHIJKLMNOPQRSTUVWXYZ
|
||||
|
||||
// Sigh... The things one need to do to detect standalone use of the 'Alt' key.
|
||||
if ((msg.message == WM_SYSKEYDOWN) && (msg.wParam != VK_MENU))
|
||||
alt_command = TRUE;
|
||||
else if (GetAsyncKeyState(VK_MENU))
|
||||
alt_pressed = TRUE;
|
||||
|
||||
// Ctrl-A => Select the log data
|
||||
if ( (IsWindowVisible(hLogDialog)) && (GetKeyState(VK_CONTROL) & 0x8000) &&
|
||||
(msg.message == WM_KEYDOWN) && (msg.wParam == 'A') ) {
|
||||
|
@ -3478,6 +3485,15 @@ relaunch:
|
|||
continue;
|
||||
}
|
||||
|
||||
// Standalone 'Alt' key toggles progress report between percent, rate (if available)
|
||||
// and remaining time (if availabe)
|
||||
if (alt_pressed && !GetAsyncKeyState(VK_MENU)) {
|
||||
alt_pressed = FALSE;
|
||||
if (!alt_command)
|
||||
update_progress_type = (update_progress_type + 1) % UPT_MAX;
|
||||
alt_command = FALSE;
|
||||
}
|
||||
|
||||
// Let the system handle dialog messages (e.g. those from the tab key)
|
||||
if (!IsDialogMessage(hDlg, &msg) && !IsDialogMessage(hLogDialog, &msg)) {
|
||||
TranslateMessage(&msg);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue