Refactor pattern for ir hook
This commit is contained in:
parent
c0059c83ac
commit
53e2ef24f1
@ -255,8 +255,6 @@ Result InputRedirection_DoOrUndoPatches(void)
|
||||
static const u32 irOrigCppFlagCode[] = {
|
||||
0xE3550000, // cmp r5, #0
|
||||
0xE3A0B080, // mov r11, #0x80
|
||||
0xE28D0060, // add r0, sp, #0xb0+var_50
|
||||
0x0A00002C // beq loc_105688
|
||||
};
|
||||
|
||||
static u32 *irHookLoc, *irWaitSyncLoc, *irCppFlagLoc;
|
||||
@ -316,7 +314,7 @@ Result InputRedirection_DoOrUndoPatches(void)
|
||||
*irWaitSyncLoc = 0xE3A00000; // mov r0, #0
|
||||
|
||||
// This NOPs out a flag check in ir:user's CPP emulation
|
||||
*(irCppFlagLoc+3) = 0xea00002c;
|
||||
*irCppFlagLoc = 0xE3150000; // tst r5, #0
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -108,7 +108,7 @@ b skip_vars
|
||||
i2c_readdeviceraw_addr:
|
||||
.word 0
|
||||
redirected_input_addr:
|
||||
.word 0
|
||||
.word 0
|
||||
|
||||
skip_vars:
|
||||
stmfd sp!, {r4-r5, lr}
|
||||
|
Reference in New Issue
Block a user