mirror of
https://github.com/RPCS3/rpcs3.git
synced 2025-04-20 11:36:13 +00:00
sys_spu_thread_send_event fix
This commit is contained in:
parent
5c8aab7917
commit
07d49b1bd8
1 changed files with 14 additions and 14 deletions
|
@ -781,15 +781,18 @@ bool SPUThread::set_ch_value(u32 ch, u32 value)
|
|||
if (!queue)
|
||||
{
|
||||
LOG_WARNING(SPU, "sys_spu_thread_send_event(spup=%d, data0=0x%x, data1=0x%x): event queue not connected", spup, (value & 0x00ffffff), data);
|
||||
return ch_in_mbox.set_values(1, CELL_ENOTCONN), true; // TODO: check error passing
|
||||
ch_in_mbox.set_values(1, CELL_ENOTCONN);
|
||||
return true;
|
||||
}
|
||||
|
||||
ch_in_mbox.set_values(1, CELL_OK);
|
||||
|
||||
if (!queue->send(SYS_SPU_THREAD_EVENT_USER_KEY, id, ((u64)spup << 32) | (value & 0x00ffffff), data))
|
||||
{
|
||||
return ch_in_mbox.set_values(1, CELL_EBUSY), true;
|
||||
ch_in_mbox.set_values(1, CELL_EBUSY);
|
||||
}
|
||||
|
||||
return ch_in_mbox.set_values(1, CELL_OK), true;
|
||||
return true;
|
||||
}
|
||||
else if (code < 128)
|
||||
{
|
||||
|
@ -838,15 +841,17 @@ bool SPUThread::set_ch_value(u32 ch, u32 value)
|
|||
fmt::throw_exception("sys_event_flag_set_bit(value=0x%x (flag=%d)): In_MBox is not empty (%d)" HERE, value, flag, count);
|
||||
}
|
||||
|
||||
if (flag > 63)
|
||||
{
|
||||
fmt::throw_exception("sys_event_flag_set_bit(id=%d, value=0x%x (flag=%d)): Invalid flag" HERE, data, value, flag);
|
||||
}
|
||||
|
||||
LOG_TRACE(SPU, "sys_event_flag_set_bit(id=%d, value=0x%x (flag=%d))", data, value, flag);
|
||||
|
||||
ch_in_mbox.set_values(1, CELL_OK);
|
||||
|
||||
// Use the syscall to set flag
|
||||
return ch_in_mbox.set_values(1, sys_event_flag_set(data, 1ull << flag)), true;
|
||||
if (s32 res = sys_event_flag_set(data, 1ull << flag))
|
||||
{
|
||||
ch_in_mbox.set_values(1, res);
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
else if (code == 192)
|
||||
{
|
||||
|
@ -860,11 +865,6 @@ bool SPUThread::set_ch_value(u32 ch, u32 value)
|
|||
fmt::throw_exception("sys_event_flag_set_bit_impatient(value=0x%x (flag=%d)): Out_MBox is empty" HERE, value, flag);
|
||||
}
|
||||
|
||||
if (flag > 63)
|
||||
{
|
||||
fmt::throw_exception("sys_event_flag_set_bit_impatient(id=%d, value=0x%x (flag=%d)): Invalid flag" HERE, data, value, flag);
|
||||
}
|
||||
|
||||
LOG_TRACE(SPU, "sys_event_flag_set_bit_impatient(id=%d, value=0x%x (flag=%d))", data, value, flag);
|
||||
|
||||
// Use the syscall to set flag
|
||||
|
|
Loading…
Add table
Reference in a new issue