From 39d82bbd3e34bf8a1d0bc8e206e30f32e82d65fc Mon Sep 17 00:00:00 2001 From: Christopher Roy Bratusek Date: Sat, 12 May 2012 17:02:05 +0200 Subject: [PATCH] option for choosing wiiload ios --- installer/wad/0001000154484246.tmd | Bin 592 -> 592 bytes main/source/BootHomebrew/BootHomebrew.cpp | 2 +- main/source/Menus/menu_settings_file.cpp | 30 ++++++++++++++++++++++ main/source/Menus/menus.h | 1 + main/source/Tools/load.cpp | 3 +++ main/source/Tools/save.cpp | 1 + main/source/main.cpp | 1 + main/source/main.h | 1 + updates | 3 ++- 9 files changed, 40 insertions(+), 2 deletions(-) diff --git a/installer/wad/0001000154484246.tmd b/installer/wad/0001000154484246.tmd index 067a1f4dbafe900e8ae70c10e54476458c9a6318..8f83e89271a9edfd991c2b954642ad6765cc7812 100644 GIT binary patch delta 34 qcmcb>a)D)o7?W7_gT}ITofeA~a)D)o7?W6egTF$@y+ySv^j7^_;gRCMbcT?twDx2jCKUkp7!6VY diff --git a/main/source/BootHomebrew/BootHomebrew.cpp b/main/source/BootHomebrew/BootHomebrew.cpp index e27dae0..b35e323 100644 --- a/main/source/BootHomebrew/BootHomebrew.cpp +++ b/main/source/BootHomebrew/BootHomebrew.cpp @@ -252,7 +252,7 @@ int BootHomebrew() if(Options.wiiload_ahb != 0) { - IOS_ReloadIOS(SelectedIOS()); + IOS_ReloadIOS(Options.wiiload_ios); } } else diff --git a/main/source/Menus/menu_settings_file.cpp b/main/source/Menus/menu_settings_file.cpp index 981d5c4..52a2c6a 100644 --- a/main/source/Menus/menu_settings_file.cpp +++ b/main/source/Menus/menu_settings_file.cpp @@ -25,6 +25,7 @@ int temp_apps; bool temp_quick_start; bool temp_show_all; int temp_device_icon; +int temp_wiiload_ios; int temp_wiiload_ahb; bool temp_navigation; string temp_device_dat; @@ -71,6 +72,7 @@ int MenuSettingsFile() sprintf(options.name[i++], tr("Storage Device")); sprintf(options.name[i++], tr("Device icon")); sprintf(options.name[i++], tr("Wiiload IOS")); + sprintf(options.name[i++], tr("Wiiload IOS Reload")); sprintf(options.name[i++], tr("Childlock")); sprintf(options.name[i++], tr("Navigation key exchange")); sprintf(options.name[i++], tr("Display")); @@ -182,6 +184,18 @@ int MenuSettingsFile() device_icon = change; break; + case WIILOAD_IOS: + change = atoi(options.value[ret]); + change++; + if(change == 71) + change = 80; + else if(change == 82) + change = 202; + else if(change > 255) + change = 255; + sprintf (options.value[ret], "%i", change); + break; + case WIILOAD_AHB: change = wiiload_ahb; change++; @@ -248,6 +262,18 @@ int MenuSettingsFile() device_icon = change; break; + case WIILOAD_IOS: + change = atoi(options.value[ret]); + change--; + if(change == 201) + change = 81; + else if(change == 79) + change = 70; + else if(change < 0) + change = 0; + sprintf (options.value[ret], "%i", change); + break; + case WIILOAD_AHB: change = wiiload_ahb; change --; @@ -282,6 +308,7 @@ int MenuSettingsFile() temp_quick_start = quick_start; temp_show_all = show_all; temp_device_icon = device_icon; + temp_wiiload_ios = atoi(options.value[WIILOAD_IOS]); temp_wiiload_ahb = wiiload_ahb; temp_device_dat = device_dat; temp_navigation = navigation; @@ -327,6 +354,7 @@ int MenuSettingsFile() sprintf (options.value[LANGUAGE], Options.temp_language.c_str()); sprintf (options.value[FONT], Options.temp_font.c_str()); sprintf (options.value[SLIDE_EFFECT], "%i", temp_slide_effect); + sprintf (options.value[WIILOAD_IOS], "%i", temp_wiiload_ios); sprintf (options.value[NUMBER_OF_APPS], "%i", temp_apps); sprintf (options.value[STORAGE_DEVICE], temp_device_dat.c_str()); sprintf (options.value[DISPLAY], " "); @@ -349,6 +377,7 @@ int MenuSettingsFile() sprintf (options.value[LANGUAGE], Options.language); sprintf (options.value[FONT], Options.font); sprintf (options.value[SLIDE_EFFECT], "%i", Options.slide_effect); + sprintf (options.value[WIILOAD_IOS], "%i", Options.wiiload_ios); sprintf (options.value[NUMBER_OF_APPS], "%i", Options.apps); sprintf (options.value[STORAGE_DEVICE], device_dat.c_str()); sprintf (options.value[DISPLAY], " "); @@ -463,6 +492,7 @@ int MenuSettingsFile() Options.quick_start = quick_start; Options.show_all = show_all; Options.device_icon = device_icon; + Options.wiiload_ios = atoi(options.value[WIILOAD_IOS]); Options.wiiload_ahb = wiiload_ahb; device_dat = options.value[STORAGE_DEVICE]; Options.navigation = navigation; diff --git a/main/source/Menus/menus.h b/main/source/Menus/menus.h index 4e4d58b..b5eba24 100644 --- a/main/source/Menus/menus.h +++ b/main/source/Menus/menus.h @@ -28,6 +28,7 @@ enum SHOW_ALL, STORAGE_DEVICE, DEVICE_ICON, + WIILOAD_IOS, WIILOAD_AHB, CHILDLOCK, NAVIGATION, diff --git a/main/source/Tools/load.cpp b/main/source/Tools/load.cpp index 0765583..ee1a56b 100644 --- a/main/source/Tools/load.cpp +++ b/main/source/Tools/load.cpp @@ -133,6 +133,9 @@ void load() if(get_setting(source, "wiiload_ahb") != "") Options.wiiload_ahb = atoi(get_setting(source, "wiiload_ahb").c_str()); + if(get_setting(source, "wiiload_ios") != "") + Options.wiiload_ios = atoi(get_setting(source, "wiiload_ios").c_str()); + if(get_setting(source, "system") != "") Settings.system = atoi(get_setting(source, "system").c_str()); diff --git a/main/source/Tools/save.cpp b/main/source/Tools/save.cpp index 0c9577e..eec01e0 100644 --- a/main/source/Tools/save.cpp +++ b/main/source/Tools/save.cpp @@ -110,6 +110,7 @@ void save() save_settings << "device_dat = \"" << Settings.device_dat << "\"" << endl; save_settings << "device_icon = \"" << Options.device_icon << "\"" << endl; save_settings << "wiiload_ahb = \"" << Options.wiiload_ahb << "\"" << endl; + save_settings << "wiiload_ios = \"" << Options.wiiload_ios << "\"" << endl; save_settings << "system = \"" << Settings.system << "\"" << endl; save_settings << "top = \"" << Settings.top << "\"" << endl; save_settings << "bottom = \"" << Settings.bottom << "\"" << endl; diff --git a/main/source/main.cpp b/main/source/main.cpp index b12c627..ca23321 100644 --- a/main/source/main.cpp +++ b/main/source/main.cpp @@ -156,6 +156,7 @@ DefaultOptions() sprintf (Options.temp_code, "NULL"); Options.slide_effect = 1; + Options.wiiload_ios = 58; Options.last_category = 1; Options.apps = 4; Options.quick_start = 0; diff --git a/main/source/main.h b/main/source/main.h index 6cc2197..707b751 100644 --- a/main/source/main.h +++ b/main/source/main.h @@ -129,6 +129,7 @@ struct SOptions bool network; bool newrevtext; int wiiload_ahb; + int wiiload_ios; }; extern struct SOptions Options; diff --git a/updates b/updates index 0b1e58e..5d92561 100644 --- a/updates +++ b/updates @@ -10,7 +10,8 @@ - : alias for (compat with HBC) - or nothing: just reload the selected IOS - if we are in neek2o we do nothing - - for wiiload there is now an options to choose what to do + - for wiiload there are now two options to choose which IOS to + use and whether to reload it - BUGFIX: fix compilation with libOGC 1.8.11 and newer //rev38: