mirror of
https://github.com/RPCS3/rpcs3.git
synced 2025-02-20 15:40:23 +00:00
PPU: Sleep after returning from thread entry function
This commit is contained in:
parent
52575a44b2
commit
6d918b565f
@ -2055,12 +2055,7 @@ void ppu_thread::fast_call(u32 addr, u64 rtoc)
|
|||||||
|
|
||||||
auto at_ret = [&]()
|
auto at_ret = [&]()
|
||||||
{
|
{
|
||||||
if (std::uncaught_exceptions())
|
if (old_cia)
|
||||||
{
|
|
||||||
cpu_on_stop();
|
|
||||||
current_function = old_func;
|
|
||||||
}
|
|
||||||
else if (old_cia)
|
|
||||||
{
|
{
|
||||||
if (state & cpu_flag::again)
|
if (state & cpu_flag::again)
|
||||||
{
|
{
|
||||||
@ -2071,6 +2066,18 @@ void ppu_thread::fast_call(u32 addr, u64 rtoc)
|
|||||||
gpr[2] = old_rtoc;
|
gpr[2] = old_rtoc;
|
||||||
lr = old_lr;
|
lr = old_lr;
|
||||||
}
|
}
|
||||||
|
else if (state & cpu_flag::ret && cia == g_fxo->get<ppu_function_manager>().func_addr(1, true) + 4)
|
||||||
|
{
|
||||||
|
std::string ret;
|
||||||
|
dump_all(ret);
|
||||||
|
|
||||||
|
ppu_log.error("Returning from the thread entry function! (func=0x%x)", entry_func.addr);
|
||||||
|
ppu_log.notice("Thread context: %s", ret);
|
||||||
|
|
||||||
|
lv2_obj::sleep(*this);
|
||||||
|
|
||||||
|
state += cpu_flag::again; // For savestates
|
||||||
|
}
|
||||||
|
|
||||||
current_function = old_func;
|
current_function = old_func;
|
||||||
g_tls_log_prefix = old_fmt;
|
g_tls_log_prefix = old_fmt;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user