mirror of
https://github.com/RPCSX/rpcsx.git
synced 2026-04-18 12:55:19 +00:00
PSV modules refactoring
This commit is contained in:
parent
8229c0ed3d
commit
bc9481db1b
129 changed files with 5000 additions and 4588 deletions
|
|
@ -1,7 +1,22 @@
|
|||
#include "stdafx.h"
|
||||
#include "Emu/System.h"
|
||||
#include "ARMv7Thread.h"
|
||||
#include "PSVFuncList.h"
|
||||
|
||||
psv_log_base::psv_log_base(const std::string& name, init_func_t init)
|
||||
: m_name(name)
|
||||
, m_init(init)
|
||||
{
|
||||
on_error = [this](s32 code, psv_func* func)
|
||||
{
|
||||
if (code < 0)
|
||||
{
|
||||
Error("%s() failed: 0x%08X", func->name, code);
|
||||
Emu.Pause();
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
std::vector<psv_func> g_psv_func_list;
|
||||
std::vector<psv_log_base*> g_psv_modules;
|
||||
|
||||
|
|
@ -67,6 +82,12 @@ void execute_psv_func_by_index(ARMv7Context& context, u32 index)
|
|||
throw "Unimplemented function";
|
||||
}
|
||||
|
||||
// rough error code processing
|
||||
if (context.GPR[0] && func->module && func->module->on_error)
|
||||
{
|
||||
func->module->on_error(context.GPR[0], func);
|
||||
}
|
||||
|
||||
context.thread.m_last_syscall = old_last_syscall;
|
||||
}
|
||||
else
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue