finish IOS-Reload stuff, option for Wiiload

This commit is contained in:
Christopher Roy Bratusek 2012-05-12 16:09:19 +02:00
parent 501392d1fd
commit d74a303be3
8 changed files with 61 additions and 11 deletions

Binary file not shown.

View File

@ -241,17 +241,31 @@ int BootHomebrew()
//as we already shut down the uneek_fs system
//so it will always return false
if (in_neek == false && !wiiload)
if (in_neek == false)
{
if(Settings.force_reload == "HW_AHBPROT")
if(wiiload)
{
//keep ahbprot rights in new ios
Patch_ahbprot();
}
if(Options.wiiload_ahb == 2)
{
Patch_ahbprot();
}
if(Settings.force_reload != "NORELOAD")
if(Options.wiiload_ahb != 0)
{
IOS_ReloadIOS(SelectedIOS());
}
}
else
{
IOS_ReloadIOS(SelectedIOS());
if(Settings.force_reload == "HW_AHBPROT")
{
Patch_ahbprot();
}
if(Settings.force_reload != "NORELOAD")
{
IOS_ReloadIOS(SelectedIOS());
}
}
}

View File

@ -25,6 +25,7 @@ int temp_apps;
bool temp_quick_start;
bool temp_show_all;
int temp_device_icon;
int temp_wiiload_ahb;
bool temp_navigation;
string temp_device_dat;
@ -44,6 +45,7 @@ int MenuSettingsFile()
bool quick_start = Options.quick_start;
bool show_all = Options.show_all;
int device_icon = Options.device_icon;
int wiiload_ahb = Options.wiiload_ahb;
bool childlock;
if(strcasecmp(Settings.code,"NULL") == 0 )
childlock = 0;
@ -68,6 +70,7 @@ int MenuSettingsFile()
sprintf(options.name[i++], tr("Show All"));
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("Childlock"));
sprintf(options.name[i++], tr("Navigation key exchange"));
sprintf(options.name[i++], tr("Display"));
@ -179,6 +182,14 @@ int MenuSettingsFile()
device_icon = change;
break;
case WIILOAD_AHB:
change = wiiload_ahb;
change++;
if(change > 2)
change = 3;
wiiload_ahb = change;
break;
case STORAGE_DEVICE:
device_dat = "USB";
sprintf (options.value[STORAGE_DEVICE], device_dat.c_str());
@ -237,6 +248,14 @@ int MenuSettingsFile()
device_icon = change;
break;
case WIILOAD_AHB:
change = wiiload_ahb;
change --;
if(change < 0)
change = 0;
wiiload_ahb = change;
break;
case STORAGE_DEVICE:
device_dat = "SD";
sprintf (options.value[STORAGE_DEVICE], device_dat.c_str());
@ -263,6 +282,7 @@ int MenuSettingsFile()
temp_quick_start = quick_start;
temp_show_all = show_all;
temp_device_icon = device_icon;
temp_wiiload_ahb = wiiload_ahb;
temp_device_dat = device_dat;
temp_navigation = navigation;
/******************************************************************************/
@ -316,6 +336,7 @@ int MenuSettingsFile()
quick_start = temp_quick_start;
show_all = temp_show_all;
device_icon = temp_device_icon;
wiiload_ahb = temp_wiiload_ahb;
if(strcasecmp(Options.temp_code,"NULL") == 0 )
childlock = 0;
else
@ -368,6 +389,13 @@ int MenuSettingsFile()
else if(device_icon == 3)
sprintf (options.value[DEVICE_ICON], tr("All"));
if(wiiload_ahb == 0)
sprintf (options.value[WIILOAD_AHB], tr("No IOS Reload"));
else if(wiiload_ahb == 1)
sprintf (options.value[WIILOAD_AHB], tr("IOS Reload"));
else if(wiiload_ahb == 2)
sprintf (options.value[WIILOAD_AHB], tr("AHB Access"));
if(!navigation)
sprintf (options.value[NAVIGATION], tr("No"));
else
@ -435,6 +463,7 @@ int MenuSettingsFile()
Options.quick_start = quick_start;
Options.show_all = show_all;
Options.device_icon = device_icon;
Options.wiiload_ahb = wiiload_ahb;
device_dat = options.value[STORAGE_DEVICE];
Options.navigation = navigation;
Options.network = Options.temp_network;
@ -498,4 +527,4 @@ int MenuSettingsFile()
mainWindow->Remove(&optionBrowser);
mainWindow->Remove(&w);
return menu;
}
}

View File

@ -28,6 +28,7 @@ enum
SHOW_ALL,
STORAGE_DEVICE,
DEVICE_ICON,
WIILOAD_AHB,
CHILDLOCK,
NAVIGATION,
DISPLAY,

View File

@ -130,6 +130,9 @@ void load()
if(get_setting(source, "device_icon") != "")
Options.device_icon = atoi(get_setting(source, "device_icon").c_str());
if(get_setting(source, "wiiload_ahb") != "")
Options.wiiload_ahb = atoi(get_setting(source, "wiiload_ahb").c_str());
if(get_setting(source, "system") != "")
Settings.system = atoi(get_setting(source, "system").c_str());

View File

@ -109,6 +109,7 @@ void save()
save_settings << "device = \"" << Settings.device << "\"" << endl;
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 << "system = \"" << Settings.system << "\"" << endl;
save_settings << "top = \"" << Settings.top << "\"" << endl;
save_settings << "bottom = \"" << Settings.bottom << "\"" << endl;

View File

@ -128,6 +128,7 @@ struct SOptions
bool navigation;
bool network;
bool newrevtext;
int wiiload_ahb;
};
extern struct SOptions Options;

View File

@ -7,10 +7,11 @@
- support for SD-Gecko and neek2o in HBF booter (obcd)
- improved meta.xml arguements for IOS-reload/HW_AHBPROT
- <ahb_access/>: preserve HW_AHBPROT and reload the selected IOS
- <no_ios_reload/>: do nothing
- <no_ios_reload/>: alias for <ahb_access/> (compat with HBC)
- <force_ios_reload/> or nothing: just reload the selected IOS
- if we are in neek2o or start an app via wiiload, we have like
<no_ios_reload/> would have been given
- if we are in neek2o we do nothing
- for wiiload there is now an options to choose what to do
- BUGFIX: fix compilation with libOGC 1.8.11 and newer
//rev38:
- changes to the app-info dialog: