mirror of
https://github.com/RPCSX/rpcsx.git
synced 2026-04-04 14:08:37 +00:00
Minor cleanup
This commit is contained in:
parent
3064cf8101
commit
22e1da5e76
19 changed files with 166 additions and 249 deletions
|
|
@ -302,8 +302,8 @@ struct sys_callback
|
|||
{
|
||||
vm::ptr<CellSysutilCallback> func;
|
||||
vm::ptr<void> arg;
|
||||
|
||||
} g_sys_callback[4];
|
||||
}
|
||||
g_sys_callback[4];
|
||||
|
||||
void sysutilSendSystemCommand(u64 status, u64 param)
|
||||
{
|
||||
|
|
@ -312,9 +312,9 @@ void sysutilSendSystemCommand(u64 status, u64 param)
|
|||
{
|
||||
if (cb.func)
|
||||
{
|
||||
Emu.GetCallbackManager().Register([=](PPUThread& PPU) -> s32
|
||||
Emu.GetCallbackManager().Register([=](CPUThread& CPU) -> s32
|
||||
{
|
||||
cb.func(PPU, status, param, cb.arg);
|
||||
cb.func(static_cast<PPUThread&>(CPU), status, param, cb.arg);
|
||||
return CELL_OK;
|
||||
});
|
||||
}
|
||||
|
|
@ -325,26 +325,16 @@ s32 cellSysutilCheckCallback(PPUThread& CPU)
|
|||
{
|
||||
cellSysutil.Log("cellSysutilCheckCallback()");
|
||||
|
||||
s32 res;
|
||||
u32 count = 0;
|
||||
|
||||
while (Emu.GetCallbackManager().Check(CPU, res))
|
||||
while (auto func = Emu.GetCallbackManager().Check())
|
||||
{
|
||||
CHECK_EMU_STATUS;
|
||||
|
||||
count++;
|
||||
|
||||
if (res)
|
||||
if (s32 res = func(CPU))
|
||||
{
|
||||
return res;
|
||||
}
|
||||
}
|
||||
|
||||
if (!count && !g_sys_callback[0].func && !g_sys_callback[1].func && !g_sys_callback[2].func && !g_sys_callback[3].func)
|
||||
{
|
||||
LOG_WARNING(TTY, "System warning: no callback registered\n");
|
||||
}
|
||||
|
||||
return CELL_OK;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue