From 5ccce4d0de58fca925c4b8f37b4242181ffa11cd Mon Sep 17 00:00:00 2001 From: Christopher Roy Bratusek Date: Fri, 13 Apr 2012 20:33:10 +0200 Subject: [PATCH] add support for in meta.xml --- installer/wad/0001000154484246.tmd | Bin 592 -> 592 bytes source/BootHomebrew/BootHomebrew.cpp | 3 ++- source/Menus/menu_main.cpp | 1 + source/Tools/app_list.cpp | 6 ++++-- source/Tools/copy_app_in_category.cpp | 6 ++++-- source/main.h | 5 ++++- updates | 1 + 7 files changed, 16 insertions(+), 6 deletions(-) diff --git a/installer/wad/0001000154484246.tmd b/installer/wad/0001000154484246.tmd index 60723be69ed9d3b0501d1db3497d833633262bf6..a6a40a194d360abb70e5baa68381612e266a3a46 100644 GIT binary patch delta 34 qcmcb>a)D)o7?W6V!wLbD?O$b6H)!2j=jeNomn(Xk#=*%tOez5CkqsLF delta 34 qcmcb>a)D)o7?YSwg2dYXzdTpoOIsbyh{?2@AoHS#@%dyOCKUkiWeuYM diff --git a/source/BootHomebrew/BootHomebrew.cpp b/source/BootHomebrew/BootHomebrew.cpp index 0df148f..4cdd334 100644 --- a/source/BootHomebrew/BootHomebrew.cpp +++ b/source/BootHomebrew/BootHomebrew.cpp @@ -223,6 +223,7 @@ int BootHomebrew() arg_add(parser(Settings.forwarder_arg, "", "").c_str()); Settings.forwarder_arg.erase(0, Settings.forwarder_arg.find("") +1); } + } if ( valid_elf_image(homebrewbuffer) == 1 ) @@ -241,7 +242,7 @@ int BootHomebrew() if(!wiiload_args) { - if(SelectedIOS() != IOS_GetVersion()) + if(SelectedIOS() != IOS_GetVersion() || Settings.force_reload != "") { //keep ahbprot rights in new ios Patch_ahbprot(); diff --git a/source/Menus/menu_main.cpp b/source/Menus/menu_main.cpp index 5f83728..f035f9e 100644 --- a/source/Menus/menu_main.cpp +++ b/source/Menus/menu_main.cpp @@ -937,6 +937,7 @@ int MenuMain() { Settings.forwarder_path = vechomebrew_list_choice[i].pathboot; Settings.forwarder_arg = vechomebrew_list_choice[i].arg.c_str(); + Settings.force_reload = vechomebrew_list_choice[i].force_reload.c_str(); boothomebrew = true; menu = MENU_EXIT; } diff --git a/source/Tools/app_list.cpp b/source/Tools/app_list.cpp index 05c7d53..ff9ebf2 100644 --- a/source/Tools/app_list.cpp +++ b/source/Tools/app_list.cpp @@ -49,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; + string line, quelltext, name, info, foldername, iconpath, arg, force_reload; ifstream in(pathmeta); while(getline(in, line)) quelltext = quelltext + line + "\n"; @@ -70,6 +70,8 @@ void add(string device, string apps_path) arg = parser(quelltext, "", ""); + force_reload = parser(quelltext, ""); + size_t amount_read; FILE *fp = fopen(iconpath.c_str(),"r"); //open the png file if(fp) //make sure the file exists @@ -88,7 +90,7 @@ void add(string device, string apps_path) } fclose(fp); //close file - vechomebrew_list_category[0].push_back(homebrew_list(name, info, foldername, icon, pathboot, arg)); + vechomebrew_list_category[0].push_back(homebrew_list(name, info, foldername, icon, pathboot, arg, force_reload)); } } closedir(pdir); diff --git a/source/Tools/copy_app_in_category.cpp b/source/Tools/copy_app_in_category.cpp index e065946..3e25116 100644 --- a/source/Tools/copy_app_in_category.cpp +++ b/source/Tools/copy_app_in_category.cpp @@ -76,7 +76,8 @@ void copy_app_in_unassigned() vechomebrew_list_category[0][i].foldername, vechomebrew_list_category[0][i].icon, vechomebrew_list_category[0][i].pathboot, - vechomebrew_list_category[0][i].arg + vechomebrew_list_category[0][i].arg, + vechomebrew_list_category[0][i].force_reload )); } } @@ -145,7 +146,8 @@ void copy_app_in_category(int category) //Apps im Kategorie kopieren vechomebrew_list_category[0][i].foldername, vechomebrew_list_category[0][i].icon, vechomebrew_list_category[0][i].pathboot, - vechomebrew_list_category[0][i].arg + vechomebrew_list_category[0][i].arg, + vechomebrew_list_category[0][i].force_reload )); break; diff --git a/source/main.h b/source/main.h index ace288b..52f87ee 100644 --- a/source/main.h +++ b/source/main.h @@ -29,7 +29,7 @@ class homebrew_list { public: // default constructor - homebrew_list(string name, string info, string foldername, u8 *icon, string pathboot, string arg) + homebrew_list(string name, string info, string foldername, u8 *icon, string pathboot, string arg, string force_reload) { this->name = name; this->info = info; @@ -37,6 +37,7 @@ public: this->icon = icon; this->pathboot = pathboot; this->arg = arg; + this->force_reload = force_reload; } string name; string info; @@ -44,6 +45,7 @@ public: u8 *icon; string pathboot; string arg; + string force_reload; }; extern std::vector vechomebrew_list_category[99]; extern std::vector vechomebrew_list_unassigned; @@ -86,6 +88,7 @@ struct SSettings string forwarder_path; string startingAppName; string forwarder_arg; + string force_reload; int Apps_from; int Apps_to; diff --git a/updates b/updates index 0cafe7f..d70f70e 100644 --- a/updates +++ b/updates @@ -17,6 +17,7 @@ - installer now supports Classic-Controller - installer now supports GameCube-Controller - installer loads HomebrewFilter rather than returning to Systemmenu +- add support for flag in meta.xml - adopt libwiigui changes from ZERO - BUGFIX: loading apps through wiiload works again - support passing arguements using wiiload [obcd]