diff --git a/HBC/META.XML b/HBC/META.XML index f20e25f7..67723e56 100644 --- a/HBC/META.XML +++ b/HBC/META.XML @@ -2,8 +2,8 @@ USB Loader GX USB Loader GX Team - 2.1 r1082 - 201105281953 + 2.1 r1083 + 201105301947 Loads games from USB-devices 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. diff --git a/source/patches/gamepatches.c b/source/patches/gamepatches.c index 45b0f8f6..d1f013f8 100644 --- a/source/patches/gamepatches.c +++ b/source/patches/gamepatches.c @@ -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; } diff --git a/source/patches/gamepatches.h b/source/patches/gamepatches.h index 22b9ba1f..f02938db 100644 --- a/source/patches/gamepatches.h +++ b/source/patches/gamepatches.h @@ -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 } diff --git a/source/settings/menus/GameLoadSM.cpp b/source/settings/menus/GameLoadSM.cpp index 7504955b..ad7c9773 100644 --- a/source/settings/menus/GameLoadSM.cpp +++ b/source/settings/menus/GameLoadSM.cpp @@ -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 diff --git a/source/usbloader/GameBooter.cpp b/source/usbloader/GameBooter.cpp index 62ecea73..6231f3d8 100644 --- a/source/usbloader/GameBooter.cpp +++ b/source/usbloader/GameBooter.cpp @@ -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;