Fix ppu progress dialog percentage

This commit is contained in:
Eladash 2021-01-31 07:30:42 +02:00 committed by Megamouse
parent b3fbada10e
commit 8d15f44b33

View file

@ -385,9 +385,10 @@ namespace
pdone = pdone_new; pdone = pdone_new;
// Compute new progress in percents // Compute new progress in percents
const u32 total = ftotal + ptotal; // Assume not all programs were found if files were not compiled (as it may contain more)
const u32 done = fdone + pdone; const u64 total = std::max<u64>(ptotal, 1) * std::max<u64>(ftotal, 1);
const double value = double(done) * 100. / double(total ? total : 1); const u64 done = pdone * std::max<u64>(fdone, 1);
const double value = std::fmin(done * 100. / total, 100.);
// Changes detected, send update // Changes detected, send update
Emu.CallAfter([=]() Emu.CallAfter([=]()