mirror of
https://github.com/RPCS3/rpcs3.git
synced 2025-07-08 16:01:42 +12:00
Fix ppu compilation progress dialog
We could only increase the value because we completely based the dialog on cellMsgDialog. This led to an issue where the dialog would increase its maximum and thus decrease the current percentage. It then couldn't decrease and was stuck on the old percentage.
This commit is contained in:
parent
16c6b44f55
commit
1078626eea
4 changed files with 35 additions and 8 deletions
|
@ -368,7 +368,6 @@ namespace
|
|||
u32 fdone = 0;
|
||||
u32 ptotal = 0;
|
||||
u32 pdone = 0;
|
||||
u32 value = 0;
|
||||
|
||||
// Update progress
|
||||
while (thread_ctrl::state() != thread_state::aborting)
|
||||
|
@ -383,12 +382,7 @@ namespace
|
|||
// Compute new progress in percents
|
||||
const u32 total = ftotal + ptotal;
|
||||
const u32 done = fdone + pdone;
|
||||
const u32 new_value = static_cast<u32>(double(done) * 100. / double(total ? total : 1));
|
||||
|
||||
// Compute the difference
|
||||
const u32 delta = new_value > value ? new_value - value : 0;
|
||||
|
||||
value += delta;
|
||||
const double value = double(done) * 100. / double(total ? total : 1);
|
||||
|
||||
// Changes detected, send update
|
||||
Emu.CallAfter([=]()
|
||||
|
@ -404,7 +398,7 @@ namespace
|
|||
{
|
||||
dlg->SetMsg(+g_progr);
|
||||
dlg->ProgressBarSetMsg(0, progr);
|
||||
dlg->ProgressBarInc(0, delta);
|
||||
dlg->ProgressBarSetValue(0, std::floor(value));
|
||||
}
|
||||
});
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue