*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"> <app version="1">
<name> USB Loader GX</name> <name> USB Loader GX</name>
<coder>USB Loader GX Team</coder> <coder>USB Loader GX Team</coder>
<version>2.1 r1082</version> <version>2.1 r1083</version>
<release_date>201105281953</release_date> <release_date>201105301947</release_date>
<no_ios_reload/> <no_ios_reload/>
<short_description>Loads games from USB-devices</short_description> <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. <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; 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 i;
int es_fd = IOS_Open(es_fs, 0); int es_fd = IOS_Open(es_fs, 0);
@ -87,7 +87,8 @@ void gamepatches(u8 videoSelected, u8 languageChoice, u8 patchcountrystring, u8
DCFlushRange(dst, len); DCFlushRange(dst, len);
} }
BlockIOSReload(blockiosreloadselect); if(blockiosreloadselect)
BlockIOSReload(2, gameIOS);
if(es_fd >= 0) if(es_fd >= 0)
IOS_Close(es_fd); IOS_Close(es_fd);
@ -555,7 +556,7 @@ int PatchNewReturnTo(u64 title)
return result; return result;
} }
bool BlockIOSReload(u8 blockiosreloadselect) bool BlockIOSReload(u8 blockiosreloadselect, u8 gameIOS)
{ {
if(blockiosreloadselect == 0) if(blockiosreloadselect == 0)
return false; return false;
@ -571,7 +572,7 @@ bool BlockIOSReload(u8 blockiosreloadselect)
int inlen = 1; int inlen = 1;
if (mode == 2) { if (mode == 2) {
inlen = 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].data = &ios;
vector[1].len = 4; vector[1].len = 4;
} }

View File

@ -9,14 +9,14 @@ extern "C" {
void RegisterDOL(u8 *dst, int len); void RegisterDOL(u8 *dst, int len);
void ClearDOLList(); 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 Anti_002_fix(u8 * Address, int Size);
bool NSMBPatch(); bool NSMBPatch();
bool PoPPatch(); bool PoPPatch();
void VideoModePatcher(u8 * dst, int len, u8 videoSelected); void VideoModePatcher(u8 * dst, int len, u8 videoSelected);
bool PatchReturnTo(void *Address, int Size, u32 id); bool PatchReturnTo(void *Address, int Size, u32 id);
int PatchNewReturnTo(u64 title); int PatchNewReturnTo(u64 title);
bool BlockIOSReload(u8 blockiosreloadselect); bool BlockIOSReload(u8 blockiosreloadselect, u8 gameIOS);
#ifdef __cplusplus #ifdef __cplusplus
} }

View File

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

View File

@ -255,7 +255,7 @@ int GameBooter::BootGame(const char * gameID)
} }
//! Do all the game patches //! 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 //! Load Ocarina codes
bool enablecheat = false; bool enablecheat = false;