mirror of
https://github.com/RPCS3/rpcs3.git
synced 2025-07-10 08:51:28 +12:00
Savestates/rsx/IO: Resume emulation on long START press, enable "Start Paused" by defaut (#12881)
* Savestates: Enable "Start Paused" by default * Emu/rsx/IO: Resume emulation on long START press * rsx: fix missing graphics with savestates' "Start Paused" setting * rsx/overlays: Add simple reference counting for messages to hide them manually * Move some code in Emulator::Pause() so thread pausing is the first thing done by this function
This commit is contained in:
parent
c8620070b9
commit
c214f45e14
13 changed files with 206 additions and 42 deletions
|
@ -18,6 +18,7 @@
|
|||
#include "Emu/Cell/lv2/sys_time.h"
|
||||
#include "Emu/Cell/Modules/cellGcmSys.h"
|
||||
#include "Overlays/overlay_perf_metrics.h"
|
||||
#include "Overlays/overlay_message.h"
|
||||
#include "Program/GLSLCommon.h"
|
||||
#include "Utilities/date_time.h"
|
||||
#include "Utilities/StrUtil.h"
|
||||
|
@ -256,6 +257,14 @@ namespace rsx
|
|||
}
|
||||
}
|
||||
|
||||
extern void set_native_ui_flip()
|
||||
{
|
||||
if (auto rsxthr = rsx::get_current_renderer())
|
||||
{
|
||||
rsxthr->async_flip_requested |= rsx::thread::flip_request::native_ui;
|
||||
}
|
||||
}
|
||||
|
||||
std::pair<u32, u32> interleaved_range_info::calculate_required_range(u32 first, u32 count) const
|
||||
{
|
||||
if (single_vertex)
|
||||
|
@ -542,7 +551,8 @@ namespace rsx
|
|||
|
||||
if (g_cfg.savestate.start_paused)
|
||||
{
|
||||
m_pause_on_first_flip = true;
|
||||
// Allow to render a whole frame within this emulation session so there won't be missing graphics
|
||||
m_pause_after_x_flips = 2;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -701,15 +711,15 @@ namespace rsx
|
|||
wait_pause();
|
||||
}
|
||||
|
||||
on_semaphore_acquire_wait();
|
||||
|
||||
if ((state & (cpu_flag::dbg_global_pause + cpu_flag::exit)) == cpu_flag::dbg_global_pause)
|
||||
{
|
||||
// Wait 16ms during emulation pause. This reduces cpu load while still giving us the chance to render overlays.
|
||||
do_local_task(rsx::FIFO_state::paused);
|
||||
thread_ctrl::wait_on(state, old, 16000);
|
||||
}
|
||||
else
|
||||
{
|
||||
on_semaphore_acquire_wait();
|
||||
std::this_thread::yield();
|
||||
}
|
||||
}
|
||||
|
@ -2670,10 +2680,9 @@ namespace rsx
|
|||
{
|
||||
performance_counters.sampled_frames++;
|
||||
|
||||
if (m_pause_on_first_flip)
|
||||
if (m_pause_after_x_flips && m_pause_after_x_flips-- == 1)
|
||||
{
|
||||
Emu.Pause();
|
||||
m_pause_on_first_flip = false;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue