mirror of
https://gitlab.com/Nanolx/homebrewfilter.git
synced 2024-12-25 17:11:48 +01:00
proper return in IosPatch_AHBPROT, add IosPatch_FULL
This commit is contained in:
parent
233601536a
commit
ec898729d5
@ -41,6 +41,17 @@ If(have_ahbprot()) {
|
||||
}
|
||||
...
|
||||
|
||||
IosPatch_FULL(bool wii, bool sciifii, bool vwii, bool verbose, int IOS): this function combines IosPatch_AHBPROT + IOS_ReloadIOS + IosPatch_RUNTIME
|
||||
|
||||
example:
|
||||
|
||||
...
|
||||
If(have_ahbprot()) {
|
||||
IosPatch_FULL(true, false, false, false, 58);
|
||||
...
|
||||
}
|
||||
...
|
||||
|
||||
= Thanks =
|
||||
- libOGC devs
|
||||
- Team Twizzers
|
||||
|
@ -111,10 +111,13 @@ static u32 apply_patch(char *name, const u8 *old, u32 old_size, const u8 *patch,
|
||||
}
|
||||
|
||||
u32 IosPatch_AHBPROT(bool verbose) {
|
||||
s32 ret = 0;
|
||||
|
||||
if (have_ahbprot()) {
|
||||
disable_memory_protection();
|
||||
//return apply_patch("set_ahbprot", check_tmd_old, sizeof(check_tmd_old), check_tmd_patch, sizeof(check_tmd_patch), 6, verbose);
|
||||
return apply_patch("es_set_ahbprot", es_set_ahbprot_old, sizeof(es_set_ahbprot_old), es_set_ahbprot_patch, sizeof(es_set_ahbprot_patch), 25, verbose);
|
||||
ret = apply_patch("es_set_ahbprot", es_set_ahbprot_old, sizeof(es_set_ahbprot_old), es_set_ahbprot_patch, sizeof(es_set_ahbprot_patch), 25, verbose);
|
||||
return ret;
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
@ -160,3 +163,22 @@ u32 IosPatch_RUNTIME(bool wii, bool sciifii, bool vwii, bool verbose) {
|
||||
}
|
||||
return count;
|
||||
}
|
||||
|
||||
u32 IosPatch_FULL(bool wii, bool sciifii, bool vwii, bool verbose, int IOS) {
|
||||
|
||||
s32 count = 0;
|
||||
s32 ret = 0;
|
||||
|
||||
if (have_ahbprot())
|
||||
ret = IosPatch_AHBPROT(verbose);
|
||||
|
||||
if (ret) {
|
||||
IOS_ReloadIOS(IOS);
|
||||
} else {
|
||||
return 0;
|
||||
}
|
||||
|
||||
count = IosPatch_RUNTIME(wii, sciifii, vwii, verbose);
|
||||
return count;
|
||||
|
||||
}
|
||||
|
@ -10,6 +10,7 @@ extern "C" {
|
||||
bool have_ahbprot();
|
||||
u32 IosPatch_AHBPROT(bool verbose);
|
||||
u32 IosPatch_RUNTIME(bool wii, bool sciifii, bool vwii, bool verbose);
|
||||
u32 IosPatch_FULL(bool wii, bool sciifii, bool vwii, bool verbose, int IOS);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user