PSV modules refactoring

This commit is contained in:
Nekotekina 2015-06-21 02:04:01 +03:00
parent 8229c0ed3d
commit bc9481db1b
129 changed files with 5000 additions and 4588 deletions

View file

@ -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