Solved How to add on and off to this? After production, only turning on has an effect, and turning it off has no effect.

Status
Not open for further replies.

OnePlus

Awesome Active Platinian
PATCH_LIB_SWITCH("libil2cpp.so", "0x200000", "00 00 A0 E3 1E FF 2F E1", boolean);


how do i call this switches?
 
switch (featNum) {
case 0:
hack = boolean;
if (hack!= 0){
PATCH_LIB_SWITCH("libil2cpp.so", "03F9968", "00 01 A0 E3 1E FF 2F E1", boolean);
}
break;
}
}
}



It is written like this. After opening, closing has no effect. Is there something wrong?
 
Because the statement "hack != 0" makes no sense here.
1st, the case only runs when the corresponding button is turned on/off

Second, PATCH_LIB_SWITCH already handles the conditional patching itself. If the boolean is true, it will patch the offset. If it's false, it will restore the offset. In short, you do not need any additional if/else statements with it
 
Status
Not open for further replies.
Back
Top Bottom