Skip to content

Commit

Permalink
Progress Dialog: Avoid PPU compilation pop-up on short linkage
Browse files Browse the repository at this point in the history
  • Loading branch information
elad335 committed Aug 22, 2023
1 parent 7a3012c commit 5711a00
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions rpcs3/Emu/system_progress.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -117,6 +117,8 @@ void progress_dialog_server::operator()()
u32 pdone = 0;
auto text1 = text0;

const u64 start_time = get_system_time();

// Update progress
while (!g_system_progress_stopping && thread_ctrl::state() != thread_state::aborting)
{
Expand Down Expand Up @@ -153,11 +155,14 @@ void progress_dialog_server::operator()()

if (show_overlay_message)
{
// Show a message instead
if (g_cfg.misc.show_ppu_compilation_hint)
// Show a message instead (if compilation period is estimated to be lengthy)
const u64 passed = (get_system_time() - start_time);

if (pdone < ptotal && g_cfg.misc.show_ppu_compilation_hint && (pdone ? (passed * (ptotal - pdone) / pdone) : (passed * (ptotal + 1))) >= 150'000)
{
rsx::overlays::show_ppu_compile_notification();
}

thread_ctrl::wait_for(10000);
continue;
}
Expand Down

0 comments on commit 5711a00

Please sign in to comment.