mirror of
https://github.com/RPCS3/rpcs3.git
synced 2025-04-21 03:55:32 +00: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
1 changed files with 10 additions and 0 deletions
|
@ -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…
Add table
Reference in a new issue