mirror of
https://github.com/RPCS3/rpcs3.git
synced 2025-07-05 14:31:24 +12:00
Added on_error handler for Module
This commit is contained in:
parent
5815d90eb4
commit
25056f49c4
4 changed files with 52 additions and 0 deletions
|
@ -198,6 +198,12 @@ void execute_ppu_func_by_index(PPUThread& CPU, u32 index)
|
|||
CPU.PC = VM_CAST(CPU.LR & ~3) - 4;
|
||||
}
|
||||
|
||||
// execute module-specific error check
|
||||
if ((s64)CPU.GPR[3] < 0 && func->module && func->module->on_error)
|
||||
{
|
||||
func->module->on_error(CPU.GPR[3], func);
|
||||
}
|
||||
|
||||
CPU.hle_code = last_code;
|
||||
}
|
||||
else
|
||||
|
@ -610,6 +616,11 @@ Module::~Module()
|
|||
|
||||
void Module::Init()
|
||||
{
|
||||
on_load = nullptr;
|
||||
on_unload = nullptr;
|
||||
on_stop = nullptr;
|
||||
on_error = nullptr;
|
||||
|
||||
m_init();
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue