mirror of
https://github.com/hrydgard/ppsspp.git
synced 2026-12-04 03:33:44 +01:00
Add the option to hook, rather than replace, funcs.
This can be useful for debugging or developing translations/game hacks, and also gives us options when dealing with GLES incompatibilities.
This commit is contained in:
1 parent
72eb15f282
commit
f489694515
6 files changed
+93
-44
No files matched your search
@@ -1022,11 +1022,16 @@ namespace MIPSInt
|
||||
const ReplacementTableEntry *entry = GetReplacementFunc(index);
|
||||
if (entry && entry->replaceFunc) {
|
||||
entry->replaceFunc();
|
||||
|
||||
if (entry->flags & (REPFLAG_HOOKENTER | REPFLAG_HOOKEXIT)) {
|
||||
// Interpret the original instruction under the hook.
|
||||
MIPSInterpret(Memory::Read_Instruction(PC, true));
|
||||
} else {
|
||||
PC = currentMIPS->r[MIPS_REG_RA];
|
||||
}
|
||||
} else {
|
||||
ERROR_LOG(CPU, "Bad replacement function index %i", index);
|
||||
}
|
||||
|
||||
PC = currentMIPS->r[MIPS_REG_RA];
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in new issue
Block a user