From 9b91755cd09a2061779c3f27a5958c121d940552 Mon Sep 17 00:00:00 2001 From: Christopher Roy Bratusek Date: Mon, 7 May 2012 19:29:17 +0200 Subject: [PATCH] improved that ios_reload stuff: ahb_access = patch_ahbprot + ios_reload force_ios_reload = ios_reload no_ios_reload = nothing --- installer/wad/0001000154484246.tmd | Bin 592 -> 592 bytes main/source/BootHomebrew/BootHomebrew.cpp | 19 ++++++++++---- main/source/Tools/app_list.cpp | 29 ++++++++-------------- 3 files changed, 24 insertions(+), 24 deletions(-) diff --git a/installer/wad/0001000154484246.tmd b/installer/wad/0001000154484246.tmd index fecebaa6eb06ee4f6038065da03132e2618a5c79..b5b09335c6fa454a462c7f727f7760aef831aab8 100644 GIT binary patch delta 34 pcmcb>a)D)o7?W6`L!YFw;P(hK_B+PSAw{iy`G$R5?UQwwQ~=N)3$6eF delta 34 qcmcb>a)D)o7?W7OL-k|x?@r3z`U~whc5?~+<*eO$gmtnGlL`Rka}2)# diff --git a/main/source/BootHomebrew/BootHomebrew.cpp b/main/source/BootHomebrew/BootHomebrew.cpp index a6f9b81..b5037e3 100644 --- a/main/source/BootHomebrew/BootHomebrew.cpp +++ b/main/source/BootHomebrew/BootHomebrew.cpp @@ -39,6 +39,7 @@ static char temp_arg[1024]; std::string filepath; extern bool in_neek; +extern bool wiiload; void arg_init() { @@ -242,14 +243,22 @@ int BootHomebrew() if (in_neek == false) { - if(Settings.force_reload != "") + if(!wiiload) { - //keep ahbprot rights in new ios - Patch_ahbprot(); + if(Settings.force_reload == "HW_AHBPROT") + { + //keep ahbprot rights in new ios + Patch_ahbprot(); + IOS_ReloadIOS(SelectedIOS()); + } + else if(Settings.force_reload != "NORELOAD") + { + IOS_ReloadIOS(SelectedIOS()); + } } - IOS_ReloadIOS(SelectedIOS()); } - wiiload_args = 0; + + wiiload_args = 0; /*this will also be called when wiiloading an application will need to check if it's expected behavour? */ diff --git a/main/source/Tools/app_list.cpp b/main/source/Tools/app_list.cpp index 207df6d..0809b42 100644 --- a/main/source/Tools/app_list.cpp +++ b/main/source/Tools/app_list.cpp @@ -31,7 +31,6 @@ void add(string device, string apps_path) char pathname[200]; char pathmeta[200]; string pathboot; - int rel_ios = 0; pdir=opendir((device + ":/" + apps_path).c_str()); @@ -50,7 +49,7 @@ void add(string device, string apps_path) { sprintf(pathmeta, (device + ":/" + apps_path + "%s/meta.xml").c_str() ,pent->d_name); - string line, quelltext, name, info, foldername, iconpath, arg, force_reload; + string line, quelltext, name, info, foldername, iconpath, arg, force_reload, temp_reload, temp_reload2, temp_reload3; ifstream in(pathmeta); while(getline(in, line)) quelltext = quelltext + line + "\n"; @@ -75,29 +74,21 @@ void add(string device, string apps_path) //hbc always reloads the ios, so we will as well //unless we are in neek mode (it's just a waste of time there) - force_reload = parser(quelltext, ""); - if (force_reload[0] != 0) + temp_reload = parser(quelltext, ""); + temp_reload2 = parser(quelltext, ""); + temp_reload3 = parser(quelltext, ""); + if (temp_reload[0] != 0) { - rel_ios = 1; - force_reload[0] = 0; + force_reload = "RELOAD"; } - force_reload = parser(quelltext, ""); - if (force_reload[0] != 0) + else if (temp_reload2[0] != 0) { - rel_ios = 1; - force_reload[0] = 0; + force_reload = "HW_AHBPROT"; } - force_reload = parser(quelltext, ""); - if (force_reload[0] != 0) + else if (temp_reload3[0] != 0) { - rel_ios = 1; + force_reload = "NORELOAD"; } - if (rel_ios == 1) - { - force_reload[0] = '/'; - force_reload[1] = 0; - } - size_t amount_read; FILE *fp = fopen(iconpath.c_str(),"r"); //open the png file