*Removed method 1, always using method 2 for block ios reload

*Reload into gameIOS and not 249
This commit is contained in:
dimok321 2011-05-30 20:35:03 +00:00
parent 96cb18d26f
commit 6ab1fb327c
5 changed files with 12 additions and 27 deletions

View File

@ -2,8 +2,8 @@
<app version="1">
<name> USB Loader GX</name>
<coder>USB Loader GX Team</coder>
<version>2.1 r1082</version>
<release_date>201105281953</release_date>
<version>2.1 r1083</version>
<release_date>201105301947</release_date>
<no_ios_reload/>
<short_description>Loads games from USB-devices</short_description>
<long_description>USB Loader GX is a libwiigui based USB iso loader with a wii-like GUI. You can install games to your HDDs and boot them with shorter loading times.

View File

@ -49,7 +49,7 @@ void ClearDOLList()
dolCount = 0;
}
void gamepatches(u8 videoSelected, u8 languageChoice, u8 patchcountrystring, u8 vipatch, u8 cheat, u8 fix002, u8 blockiosreloadselect, u64 returnTo)
void gamepatches(u8 videoSelected, u8 languageChoice, u8 patchcountrystring, u8 vipatch, u8 cheat, u8 fix002, u8 blockiosreloadselect, u8 gameIOS, u64 returnTo)
{
int i;
int es_fd = IOS_Open(es_fs, 0);
@ -87,7 +87,8 @@ void gamepatches(u8 videoSelected, u8 languageChoice, u8 patchcountrystring, u8
DCFlushRange(dst, len);
}
BlockIOSReload(blockiosreloadselect);
if(blockiosreloadselect)
BlockIOSReload(2, gameIOS);
if(es_fd >= 0)
IOS_Close(es_fd);
@ -555,7 +556,7 @@ int PatchNewReturnTo(u64 title)
return result;
}
bool BlockIOSReload(u8 blockiosreloadselect)
bool BlockIOSReload(u8 blockiosreloadselect, u8 gameIOS)
{
if(blockiosreloadselect == 0)
return false;
@ -571,7 +572,7 @@ bool BlockIOSReload(u8 blockiosreloadselect)
int inlen = 1;
if (mode == 2) {
inlen = 2;
ios = 249; // ios to be reloaded in place of the requested one
ios = gameIOS; // ios to be reloaded in place of the requested one
vector[1].data = &ios;
vector[1].len = 4;
}

View File

@ -9,14 +9,14 @@ extern "C" {
void RegisterDOL(u8 *dst, int len);
void ClearDOLList();
void gamepatches(u8 videoSelected, u8 languageChoice, u8 patchcountrystring, u8 vipatch, u8 cheat, u8 fix002, u8 blockiosreloadselect, u64 returnTo);
void gamepatches(u8 videoSelected, u8 languageChoice, u8 patchcountrystring, u8 vipatch, u8 cheat, u8 fix002, u8 blockiosreloadselect, u8 gameIOS, u64 returnTo);
bool Anti_002_fix(u8 * Address, int Size);
bool NSMBPatch();
bool PoPPatch();
void VideoModePatcher(u8 * dst, int len, u8 videoSelected);
bool PatchReturnTo(void *Address, int Size, u32 id);
int PatchNewReturnTo(u64 title);
bool BlockIOSReload(u8 blockiosreloadselect);
bool BlockIOSReload(u8 blockiosreloadselect, u8 gameIOS);
#ifdef __cplusplus
}

View File

@ -91,13 +91,6 @@ static const char * AlternateDOLText[] =
trNOOP( "Default" ),
};
static const char * IOSReloadBlockText[] =
{
trNOOP( "OFF" ),
trNOOP( "Method 1" ),
trNOOP( "Method 2" ),
};
GameLoadSM::GameLoadSM(const char * GameID)
: SettingsMenu(tr("Game Load"), &GuiOptions, MENU_NONE)
{
@ -242,12 +235,7 @@ void GameLoadSM::SetOptionValues()
}
//! Settings: Block IOS Reload
if(IosLoader::IsHermesIOS(GameConfig.ios == INHERIT ? Settings.cios : GameConfig.ios) && GameConfig.iosreloadblock)
Options->SetValue(Idx++, tr("ON"));
else if(GameConfig.iosreloadblock)
Options->SetValue(Idx++, "%s", tr(IOSReloadBlockText[GameConfig.iosreloadblock]));
else
Options->SetValue(Idx++, tr("OFF"));
Options->SetValue(Idx++, "%s", tr( OnOffText[GameConfig.iosreloadblock]) );
//! Settings: Game Lock
Options->SetValue(Idx++, "%s", tr( OnOffText[GameConfig.Locked] ));
@ -389,11 +377,7 @@ int GameLoadSM::GetMenuInternal()
//! Settings: Block IOS Reload
else if (ret == ++Idx)
{
++GameConfig.iosreloadblock;
if(GameConfig.iosreloadblock >= MAX_ON_OFF && IosLoader::IsHermesIOS(GameConfig.ios == INHERIT ? Settings.cios : GameConfig.ios))
GameConfig.iosreloadblock = 0;
else if (GameConfig.iosreloadblock >= 3)
GameConfig.iosreloadblock = 0;
if(++GameConfig.iosreloadblock >= MAX_ON_OFF) GameConfig.iosreloadblock = 0;
}
//! Settings: Game Lock

View File

@ -255,7 +255,7 @@ int GameBooter::BootGame(const char * gameID)
}
//! Do all the game patches
gamepatches(videoChoice, languageChoice, countrystrings, viChoice, ocarinaChoice, fix002, reloadblock, returnToChoice);
gamepatches(videoChoice, languageChoice, countrystrings, viChoice, ocarinaChoice, fix002, reloadblock, iosChoice, returnToChoice);
//! Load Ocarina codes
bool enablecheat = false;