From 71d1790f7f57f93cf9c3b1d847fc01d949504eb8 Mon Sep 17 00:00:00 2001 From: dimok321 <15055714+dimok789@users.noreply.github.com> Date: Tue, 31 May 2011 17:16:24 +0000 Subject: [PATCH] *fixed two nasty bugs I added in R1082 preventing every game patch from working (block ios reload with d2x is the only one that still will not work yet. a change for this is upcomming) *added back rev number to credits *allow boot of loader when IOS222 or 245-250 is available on the system *fixed reload of game list after game rename --- HBC/META.XML | 4 ++-- source/StartUpProcess.cpp | 2 +- source/menu/GameBrowseMenu.cpp | 1 + source/menu/GameBrowseMenu.hpp | 2 +- source/patches/gamepatches.c | 6 +++--- source/prompts/GameWindow.cpp | 2 ++ source/prompts/GameWindow.hpp | 3 +++ source/prompts/PromptWindows.cpp | 4 ++-- source/system/IosLoader.cpp | 2 +- 9 files changed, 16 insertions(+), 10 deletions(-) diff --git a/HBC/META.XML b/HBC/META.XML index 67723e56..3df23c68 100644 --- a/HBC/META.XML +++ b/HBC/META.XML @@ -2,8 +2,8 @@ USB Loader GX USB Loader GX Team - 2.1 r1083 - 201105301947 + 2.1 r1084 + 201105302033 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/StartUpProcess.cpp b/source/StartUpProcess.cpp index 0d2a2b03..50790798 100644 --- a/source/StartUpProcess.cpp +++ b/source/StartUpProcess.cpp @@ -122,7 +122,7 @@ bool StartUpProcess::Execute() if(IosLoader::LoadAppCios() < 0) { - SetTextf("Failed loading any cIOS. USB Loader GX requires at least cIOS 222, 249 or 250. Exiting...\n"); + SetTextf("Failed loading any cIOS. USB Loader GX requires at least cIOS 222 or 245-250. Exiting...\n"); sleep(5); Sys_BackToLoader(); } diff --git a/source/menu/GameBrowseMenu.cpp b/source/menu/GameBrowseMenu.cpp index fd20391f..65ac17e8 100644 --- a/source/menu/GameBrowseMenu.cpp +++ b/source/menu/GameBrowseMenu.cpp @@ -1292,6 +1292,7 @@ int GameBrowseMenu::OpenClickedGame() { SetState(STATE_DISABLED); GameWindow * GamePrompt = new GameWindow(gameSelected); + GamePrompt->SetGameBrowseMenu(this); mainWindow->Append(GamePrompt); choice = GamePrompt->Show(); gameSelected = GamePrompt->GetSelectedGame(); diff --git a/source/menu/GameBrowseMenu.hpp b/source/menu/GameBrowseMenu.hpp index 0003f7e8..c1216730 100644 --- a/source/menu/GameBrowseMenu.hpp +++ b/source/menu/GameBrowseMenu.hpp @@ -14,9 +14,9 @@ class GameBrowseMenu : public GuiWindow GameBrowseMenu(); ~GameBrowseMenu(); static int Execute(); + void ReloadBrowser(); protected: int MainLoop(); - void ReloadBrowser(); int OpenClickedGame(); int GetSelectedGame(); int GetClickedGame(); diff --git a/source/patches/gamepatches.c b/source/patches/gamepatches.c index d1f013f8..f79fa757 100644 --- a/source/patches/gamepatches.c +++ b/source/patches/gamepatches.c @@ -51,15 +51,15 @@ void ClearDOLList() void gamepatches(u8 videoSelected, u8 languageChoice, u8 patchcountrystring, u8 vipatch, u8 cheat, u8 fix002, u8 blockiosreloadselect, u8 gameIOS, u64 returnTo) { + es_fd = IOS_Open(es_fs, 0); int i; - int es_fd = IOS_Open(es_fs, 0); int returnToPatched = PatchNewReturnTo(returnTo); for(i = 0; i < dolCount; ++i) { - u8 *dst = dolList[dolCount].dst; - int len = dolList[dolCount].len; + u8 *dst = dolList[i].dst; + int len = dolList[i].len; VideoModePatcher(dst, len, videoSelected); diff --git a/source/prompts/GameWindow.cpp b/source/prompts/GameWindow.cpp index d2a541c8..868c73f4 100644 --- a/source/prompts/GameWindow.cpp +++ b/source/prompts/GameWindow.cpp @@ -530,6 +530,8 @@ int GameWindow::MainLoop() ((GuiWindow *) parentElement)->SetState(STATE_DISABLED); ((GuiWindow *) parentElement)->Append(this); } + + if(browserMenu) browserMenu->ReloadBrowser(); } else if (btnRight->GetState() == STATE_CLICKED) //next game diff --git a/source/prompts/GameWindow.hpp b/source/prompts/GameWindow.hpp index 5d93b40b..c2679a1e 100644 --- a/source/prompts/GameWindow.hpp +++ b/source/prompts/GameWindow.hpp @@ -3,6 +3,7 @@ #include "libwiigui/gui.h" #include "libwiigui/gui_diskcover.h" +#include "menu/GameBrowseMenu.hpp" #define FAVORITE_STARS 5 @@ -13,6 +14,7 @@ class GameWindow : public GuiWindow ~GameWindow(); int Show(); int GetSelectedGame() { return gameSelected; }; + void SetGameBrowseMenu(GameBrowseMenu *m) { browserMenu = m; }; protected: int MainLoop(); void LoadGameSound(const u8 * id); @@ -23,6 +25,7 @@ class GameWindow : public GuiWindow bool reducedVol; int returnVal; int gameSelected; + GameBrowseMenu *browserMenu; GuiTrigger * trigA; GuiTrigger * trigB; diff --git a/source/prompts/PromptWindows.cpp b/source/prompts/PromptWindows.cpp index 6136bd4f..b64cee44 100644 --- a/source/prompts/PromptWindows.cpp +++ b/source/prompts/PromptWindows.cpp @@ -242,9 +242,9 @@ void WindowCredits() char SvnRev[30]; #ifdef FULLCHANNEL - snprintf(SvnRev, sizeof(SvnRev), "v2.1c IOS%u (Rev %u)", IOS_GetVersion(), IOS_GetRevision()); + snprintf(SvnRev, sizeof(SvnRev), "Rev%sc IOS%u (Rev %u)", GetRev(), IOS_GetVersion(), IOS_GetRevision()); #else - snprintf(SvnRev, sizeof(SvnRev), "v2.1 IOS%u (Rev %u)", IOS_GetVersion(), IOS_GetRevision()); + snprintf(SvnRev, sizeof(SvnRev), "Rev%s IOS%u (Rev %u)", GetRev(), IOS_GetVersion(), IOS_GetRevision()); #endif txt[i] = new GuiText(SvnRev, 16, ( GXColor ) {255, 255, 255, 255}); diff --git a/source/system/IosLoader.cpp b/source/system/IosLoader.cpp index aaa48776..1dcfb51e 100644 --- a/source/system/IosLoader.cpp +++ b/source/system/IosLoader.cpp @@ -52,7 +52,7 @@ s32 IosLoader::LoadAppCios() if((int) activeCios == Settings.cios) return 0; - u32 ciosLoadPriority[] = { Settings.cios, 222, 249, 250 }; // Ascending. + u32 ciosLoadPriority[] = { Settings.cios, 222, 249, 250, 245, 246, 247, 248 }; // Ascending. for (u32 i = 0; i < (sizeof(ciosLoadPriority)/sizeof(ciosLoadPriority[0])); ++i)