Fix sys_ppu_thread_get_priority page faults

This commit is contained in:
Eladash 2020-04-29 07:57:12 +03:00
parent 69f82a7311
commit c1dc6838fa

View File

@ -277,6 +277,8 @@ error_code sys_ppu_thread_get_priority(u32 thread_id, vm::ptr<s32> priop)
// Clean some detached thread (hack)
g_fxo->get<ppu_thread_cleaner>()->clean(0);
u32 prio;
const auto thread = idm::check<named_thread<ppu_thread>>(thread_id, [&](ppu_thread& thread)
{
if (thread.joiner == ppu_join_status::exited)
@ -284,7 +286,7 @@ error_code sys_ppu_thread_get_priority(u32 thread_id, vm::ptr<s32> priop)
return false;
}
*priop = thread.prio;
prio = thread.prio;
return true;
});
@ -293,6 +295,7 @@ error_code sys_ppu_thread_get_priority(u32 thread_id, vm::ptr<s32> priop)
return CELL_ESRCH;
}
*priop = prio;
return CELL_OK;
}