mirror of
https://github.com/RPCSX/rpcsx.git
synced 2026-04-05 22:47:03 +00:00
PPU Progress Hint: Show it as long as it needs
This commit is contained in:
parent
8fa23436f9
commit
67893fb8f8
5 changed files with 42 additions and 7 deletions
|
|
@ -167,7 +167,9 @@ void progress_dialog_server::operator()()
|
|||
const char* text1 = nullptr;
|
||||
|
||||
const u64 start_time = get_system_time();
|
||||
u64 wait_no_update_count = 0;
|
||||
u64 wait_no_update_count = 0;
|
||||
|
||||
std::shared_ptr<atomic_t<u32>> ppu_cue_refs;
|
||||
|
||||
// Update progress
|
||||
while (!g_system_progress_stopping && thread_ctrl::state() != thread_state::aborting)
|
||||
|
|
@ -208,9 +210,18 @@ void progress_dialog_server::operator()()
|
|||
const u64 remaining_usec = pdone ? utils::rational_mul<u64>(passed_usec, static_cast<u64>(ptotal) - pdone, pdone) : (passed_usec * ptotal);
|
||||
|
||||
// Only show compile notification if we estimate at least 100ms
|
||||
if (remaining_usec >= 100'000ULL)
|
||||
if (remaining_usec >= 100'000ULL && (!ppu_cue_refs || !*ppu_cue_refs))
|
||||
{
|
||||
rsx::overlays::show_ppu_compile_notification();
|
||||
ppu_cue_refs = rsx::overlays::show_ppu_compile_notification();
|
||||
}
|
||||
}
|
||||
|
||||
if (pdone >= ptotal)
|
||||
{
|
||||
if (ppu_cue_refs)
|
||||
{
|
||||
*ppu_cue_refs = 0;
|
||||
ppu_cue_refs.reset();
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -321,6 +332,11 @@ void progress_dialog_server::operator()()
|
|||
wait_no_update_count++;
|
||||
}
|
||||
|
||||
if (ppu_cue_refs)
|
||||
{
|
||||
*ppu_cue_refs = 0;
|
||||
}
|
||||
|
||||
if (g_system_progress_stopping || thread_ctrl::state() == thread_state::aborting)
|
||||
{
|
||||
break;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue