mirror of
https://github.com/RPCS3/rpcs3.git
synced 2025-07-08 16:01:42 +12:00
overlays: Show feedback while stopping ppu compilation
This commit is contained in:
parent
e5876b3a1b
commit
da4f4dafbd
4 changed files with 37 additions and 7 deletions
|
@ -1602,6 +1602,18 @@ void Emulator::Stop(bool restart)
|
|||
|
||||
sys_log.notice("Stopping emulator...");
|
||||
|
||||
if (!restart)
|
||||
{
|
||||
// Show visual feedback to the user in case that stopping takes a while.
|
||||
// This needs to be done before actually stopping, because otherwise the necessary threads will be terminated before we can show an image.
|
||||
if (auto progress_dialog = g_fxo->try_get<named_thread<progress_dialog_server>>(); progress_dialog && +g_progr)
|
||||
{
|
||||
// We are currently showing a progress dialog. Notify it that we are going to stop emulation.
|
||||
g_system_progress_stopping = true;
|
||||
std::this_thread::sleep_for(20ms); // Enough for one frame to be rendered
|
||||
}
|
||||
}
|
||||
|
||||
named_thread stop_watchdog("Stop Watchdog", [&]()
|
||||
{
|
||||
for (uint i = 0; thread_ctrl::state() != thread_state::aborting;)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue