fix layeredfs regression
This commit is contained in:
parent
3e724e88a8
commit
4285736286
@ -530,7 +530,7 @@ static inline bool patchLayeredFs(u64 progId, u8 *code, u32 size, u32 textSize,
|
||||
|
||||
romfsRedirPatchSubstituted1 = *(u32 *)(code + fsOpenFileDirectly);
|
||||
romfsRedirPatchHook1 = MAKE_BRANCH(payloadOffset + (u32)&romfsRedirPatchHook1 - (u32)romfsRedirPatch, fsOpenFileDirectly + 4);
|
||||
romfsRedirPatchSubstituted1 = *(u32 *)(code + fsTryOpenFile);
|
||||
romfsRedirPatchSubstituted2 = *(u32 *)(code + fsTryOpenFile);
|
||||
romfsRedirPatchHook2 = MAKE_BRANCH(payloadOffset + (u32)&romfsRedirPatchHook2 - (u32)romfsRedirPatch, fsTryOpenFile + 4);
|
||||
romfsRedirPatchCustomPath = pathAddress;
|
||||
romfsRedirPatchFsMountArchive = 0x100000 + fsMountArchive;
|
||||
|
@ -23,7 +23,7 @@ romfsRedirPatch:
|
||||
.word 0xdead0002 @ Substituted opcode
|
||||
.global romfsRedirPatchHook2
|
||||
romfsRedirPatchHook2:
|
||||
.word 0xdead0002 @ Branch to hooked function
|
||||
.word 0xdead0003 @ Branch to hooked function
|
||||
|
||||
@ Mounts the archive and registers it as 'lf:'
|
||||
mountArchive:
|
||||
@ -31,7 +31,7 @@ romfsRedirPatch:
|
||||
bne romfsRedirPatchSubstituted1
|
||||
stmfd sp!, {r0-r4, lr}
|
||||
sub sp, sp, #4
|
||||
adr r1, romfsRedirPatchArchiveId
|
||||
ldr r1, romfsRedirPatchArchiveId
|
||||
mov r0, sp
|
||||
ldr r4, romfsRedirPatchFsMountArchive
|
||||
blx r4
|
||||
|
Reference in New Issue
Block a user