mirror of
https://github.com/RPCS3/rpcs3.git
synced 2026-01-01 22:30:02 +01:00
sys_semaphore: add state check to sys_semaphore_get_value
Also to sys_semaphore_create, although we don't do it.
This commit is contained in:
parent
8bc9868c1f
commit
733b46d51a
|
|
@ -46,6 +46,11 @@ error_code sys_semaphore_create(ppu_thread& ppu, vm::ptr<u32> sem_id, vm::ptr<sy
|
|||
return error;
|
||||
}
|
||||
|
||||
if (ppu.test_stopped())
|
||||
{
|
||||
return {};
|
||||
}
|
||||
|
||||
*sem_id = idm::last_id();
|
||||
return CELL_OK;
|
||||
}
|
||||
|
|
@ -283,6 +288,11 @@ error_code sys_semaphore_get_value(ppu_thread& ppu, u32 sem_id, vm::ptr<s32> cou
|
|||
return CELL_EFAULT;
|
||||
}
|
||||
|
||||
if (ppu.test_stopped())
|
||||
{
|
||||
return {};
|
||||
}
|
||||
|
||||
*count = sema.ret;
|
||||
return CELL_OK;
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue