mirror of
https://github.com/RPCSX/rpcsx.git
synced 2026-04-05 06:26:49 +00:00
sys_event_queue: Fix ports disconnection after queue destruction
This commit is contained in:
parent
37110098c7
commit
2b75df22d9
5 changed files with 46 additions and 21 deletions
|
|
@ -82,7 +82,7 @@ error_code sys_timer_destroy(ppu_thread& ppu, u32 timer_id)
|
|||
|
||||
const auto timer = idm::withdraw<lv2_obj, lv2_timer>(timer_id, [&](lv2_timer& timer) -> CellError
|
||||
{
|
||||
if (std::shared_lock lock(timer.mutex); !timer.port.expired())
|
||||
if (std::shared_lock lock(timer.mutex); lv2_event_queue::check(timer.port))
|
||||
{
|
||||
return CELL_EISCONN;
|
||||
}
|
||||
|
|
@ -231,7 +231,7 @@ error_code sys_timer_connect_event_queue(ppu_thread& ppu, u32 timer_id, u32 queu
|
|||
|
||||
std::lock_guard lock(timer.mutex);
|
||||
|
||||
if (!timer.port.expired())
|
||||
if (lv2_event_queue::check(timer.port))
|
||||
{
|
||||
return CELL_EISCONN;
|
||||
}
|
||||
|
|
@ -269,7 +269,7 @@ error_code sys_timer_disconnect_event_queue(ppu_thread& ppu, u32 timer_id)
|
|||
|
||||
timer.state = SYS_TIMER_STATE_STOP;
|
||||
|
||||
if (timer.port.expired())
|
||||
if (!lv2_event_queue::check(timer.port))
|
||||
{
|
||||
return CELL_ENOTCONN;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue