diff --git a/rpcs3/Emu/CPU/CPUThread.cpp b/rpcs3/Emu/CPU/CPUThread.cpp index b5ab265758..a0a1cdfed1 100644 --- a/rpcs3/Emu/CPU/CPUThread.cpp +++ b/rpcs3/Emu/CPU/CPUThread.cpp @@ -351,6 +351,11 @@ void CPUThread::Task() { ConLog.Error("Exception: %s", e); } + catch(int exitcode) + { + ConLog.Success("Exit Code: %d", exitcode); + return; + } //ConLog.Write("%s leave", CPUThread::GetFName()); diff --git a/rpcs3/Emu/SysCalls/SysCalls.h b/rpcs3/Emu/SysCalls/SysCalls.h index 21885708cc..4d5307d115 100644 --- a/rpcs3/Emu/SysCalls/SysCalls.h +++ b/rpcs3/Emu/SysCalls/SysCalls.h @@ -169,7 +169,7 @@ extern int sys_mutex_trylock(u32 mutex_id); extern int sys_mutex_unlock(u32 mutex_id); //ppu_thread -extern int sys_ppu_thread_exit(int errorcode); +extern void sys_ppu_thread_exit(int errorcode); extern int sys_ppu_thread_yield(); extern int sys_ppu_thread_join(u32 thread_id, u32 vptr_addr); extern int sys_ppu_thread_detach(u32 thread_id); diff --git a/rpcs3/Emu/SysCalls/lv2/SC_PPU_Thread.cpp b/rpcs3/Emu/SysCalls/lv2/SC_PPU_Thread.cpp index 092d5102a2..277f7f21a1 100644 --- a/rpcs3/Emu/SysCalls/lv2/SC_PPU_Thread.cpp +++ b/rpcs3/Emu/SysCalls/lv2/SC_PPU_Thread.cpp @@ -10,7 +10,7 @@ enum SYS_PPU_THREAD_DONE_INIT, }; -int sys_ppu_thread_exit(int errorcode) +void sys_ppu_thread_exit(int errorcode) { if(errorcode == 0) { @@ -25,7 +25,7 @@ int sys_ppu_thread_exit(int errorcode) thr.SetExitStatus(errorcode); Emu.GetCPU().RemoveThread(thr.GetId()); - return CELL_OK; + throw errorcode; } int sys_ppu_thread_yield()