mirror of
https://github.com/RPCS3/rpcs3.git
synced 2025-03-29 22:20:48 +00:00
Progress Dialog: Force update every 20 seconds
This commit is contained in:
parent
c019b10aa8
commit
26746ac9ee
@ -167,14 +167,18 @@ void progress_dialog_server::operator()()
|
|||||||
const char* text1 = nullptr;
|
const char* text1 = nullptr;
|
||||||
|
|
||||||
const u64 start_time = get_system_time();
|
const u64 start_time = get_system_time();
|
||||||
|
u64 wait_no_update_count = 0;
|
||||||
|
|
||||||
// Update progress
|
// Update progress
|
||||||
while (!g_system_progress_stopping && thread_ctrl::state() != thread_state::aborting)
|
while (!g_system_progress_stopping && thread_ctrl::state() != thread_state::aborting)
|
||||||
{
|
{
|
||||||
const auto& [text_new, ftotal_new, fdone_new, ftotal_bits_new, fknown_bits_new, ptotal_new, pdone_new] = get_state();
|
const auto& [text_new, ftotal_new, fdone_new, ftotal_bits_new, fknown_bits_new, ptotal_new, pdone_new] = get_state();
|
||||||
|
|
||||||
if (ftotal != ftotal_new || fdone != fdone_new || fknown_bits != fknown_bits_new || ftotal_bits != ftotal_bits_new || ptotal != ptotal_new || pdone != pdone_new || text_new != text1)
|
// Force-update every 20 seconds to update remaining time
|
||||||
|
if (wait_no_update_count == 100u * 20 || ftotal != ftotal_new || fdone != fdone_new || fknown_bits != fknown_bits_new
|
||||||
|
|| ftotal_bits != ftotal_bits_new || ptotal != ptotal_new || pdone != pdone_new || text_new != text1)
|
||||||
{
|
{
|
||||||
|
wait_no_update_count = 0;
|
||||||
ftotal = ftotal_new;
|
ftotal = ftotal_new;
|
||||||
fdone = fdone_new;
|
fdone = fdone_new;
|
||||||
ftotal_bits = ftotal_bits_new;
|
ftotal_bits = ftotal_bits_new;
|
||||||
@ -307,7 +311,8 @@ void progress_dialog_server::operator()()
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
thread_ctrl::wait_for(10000);
|
thread_ctrl::wait_for(10'000);
|
||||||
|
wait_no_update_count++;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (g_system_progress_stopping || thread_ctrl::state() == thread_state::aborting)
|
if (g_system_progress_stopping || thread_ctrl::state() == thread_state::aborting)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user