mirror of
https://github.com/pbatard/rufus.git
synced 2025-05-23 03:06:56 -04:00
[ui] fix percent not being displayed on slow format
This commit is contained in:
parent
996d4254b3
commit
1b02181f74
5 changed files with 15 additions and 15 deletions
|
@ -104,7 +104,7 @@ out:
|
|||
*/
|
||||
static BOOLEAN __stdcall FormatExCallback(FILE_SYSTEM_CALLBACK_COMMAND Command, DWORD Action, PVOID pData)
|
||||
{
|
||||
DWORD* percent;
|
||||
char percent_str[8];
|
||||
if (IS_ERROR(FormatStatus))
|
||||
return FALSE;
|
||||
|
||||
|
@ -112,9 +112,9 @@ static BOOLEAN __stdcall FormatExCallback(FILE_SYSTEM_CALLBACK_COMMAND Command,
|
|||
|
||||
switch(Command) {
|
||||
case FCC_PROGRESS:
|
||||
percent = (DWORD*)pData;
|
||||
PrintInfo(0, MSG_217, 1.0f * (*percent));
|
||||
UpdateProgress(OP_FORMAT, 1.0f * (*percent));
|
||||
static_sprintf(percent_str, "%lu%%", *((DWORD*)pData));
|
||||
PrintInfo(0, MSG_217, percent_str);
|
||||
UpdateProgress(OP_FORMAT, 1.0f * (*((DWORD*)pData)));
|
||||
break;
|
||||
case FCC_STRUCTURE_PROGRESS: // No progress on quick format
|
||||
if (task_number < nb_steps[actual_fs_type] - 1) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue