diff --git a/HBC/META.XML b/HBC/META.XML index a3aae819..c7596951 100644 --- a/HBC/META.XML +++ b/HBC/META.XML @@ -2,8 +2,8 @@ USB Loader GX USB Loader GX Team - 2.0 r1049 - 201101201831 + 2.0 r1050 + 201101211944 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/GameBootProcess.cpp b/source/GameBootProcess.cpp index 3b643130..456fc3f7 100644 --- a/source/GameBootProcess.cpp +++ b/source/GameBootProcess.cpp @@ -114,9 +114,6 @@ int BootGame(const char * gameID) int ret = 0; GameCFG * game_cfg = GameSettings.GetGameCFG(gameHeader.id); - if(!game_cfg) - game_cfg = GameSettings.GetDefault(); - u8 videoChoice = game_cfg->video; u8 languageChoice = game_cfg->language; u8 ocarinaChoice = game_cfg->ocarina; diff --git a/source/menu/GameBrowseMenu.cpp b/source/menu/GameBrowseMenu.cpp index e094a42c..3df17e8e 100644 --- a/source/menu/GameBrowseMenu.cpp +++ b/source/menu/GameBrowseMenu.cpp @@ -282,6 +282,10 @@ GameBrowseMenu::GameBrowseMenu() DownloadBtn->SetTrigger(1, trig1); DownloadBtn->SetToolTip(DownloadBtnTT, 205, -30); + gameCoverImg = new GuiImage(); + gameCoverImg->SetPosition(thInt("26 - cover/download btn pos x"), thInt("58 - cover/download btn pos y")); + gameCoverImg->SetWidescreen(Settings.widescreen); + IDBtnTT = new GuiTooltip(tr( "Click to change game ID" )); if (Settings.wsprompt) IDBtnTT->SetWidescreen(Settings.widescreen); IDBtnTT->SetAlpha(thInt("255 - tooltip alpha")); @@ -608,7 +612,6 @@ void GameBrowseMenu::ReloadBrowser() } else if (Settings.gameDisplay == GRID_MODE) { - DownloadBtn->SetImage(NULL); DownloadBtn->SetSize(0, 0); UpdateGameInfoText(NULL); gridBtn->SetImage(gridBtnImg); @@ -641,7 +644,6 @@ void GameBrowseMenu::ReloadBrowser() } else if (Settings.gameDisplay == CAROUSEL_MODE) { - DownloadBtn->SetImage(NULL); DownloadBtn->SetSize(0, 0); UpdateGameInfoText(NULL); carouselBtn->SetImage(carouselBtnImg); @@ -683,6 +685,7 @@ void GameBrowseMenu::ReloadBrowser() Append(gameInfo); Append(homeBtn); Append(settingsBtn); + Append(gameCoverImg); if (Settings.godmode || !(Settings.ParentalBlocks & BLOCK_HBC_MENU)) Append(homebrewBtn); @@ -1253,9 +1256,6 @@ int GameBrowseMenu::OpenClickedGame() char IDfull[7]; snprintf(IDfull, sizeof(IDfull), "%s", (char *) header->id); - u8 alternatedol = OFF; - u8 ocarinaChoice = Settings.ocarina; - bool returnHere = true;// prompt to start game int choice = -1; @@ -1288,23 +1288,18 @@ int GameBrowseMenu::OpenClickedGame() wiilight(0); GameCFG* game_cfg = GameSettings.GetGameCFG(header->id); - if (game_cfg) - { - alternatedol = game_cfg->loadalternatedol; - ocarinaChoice = game_cfg->ocarina; - } - if (alternatedol == 2) + if (game_cfg->loadalternatedol == 2) CheckAlternativeDOL(IDfull); - else if(alternatedol == 3 && WDMMenu::Show(header) == 0) + else if(game_cfg->loadalternatedol == 3 && WDMMenu::Show(header) == 0) { RunGame = false; returnHere = true; } - else if(alternatedol == 4) + else if(game_cfg->loadalternatedol == 4) defaultDolPrompt((char *) header->id); - if (RunGame && ocarinaChoice != OFF) + if (RunGame && game_cfg->ocarina != OFF) CheckOcarina(IDfull); if(RunGame) @@ -1337,19 +1332,12 @@ int GameBrowseMenu::OpenClickedGame() void GameBrowseMenu::LoadCover(struct discHdr *header) { - DownloadBtn->SetImage(NULL); - if(gameCover) - delete gameCover; + gameCoverImg->SetImage(NULL); + delete gameCover; gameCover = LoadCoverImage(header); - if (gameCoverImg) - delete gameCoverImg; - - gameCoverImg = new GuiImage(gameCover); - gameCoverImg->SetWidescreen(Settings.widescreen); - - DownloadBtn->SetImage(gameCoverImg);// put the new image on the download button + gameCoverImg->SetImage(gameCover);// put the new image on the download button } void GameBrowseMenu::CheckOcarina(const char * IDfull) diff --git a/source/settings/CGameSettings.cpp b/source/settings/CGameSettings.cpp index 0c6074e3..e4ecd980 100644 --- a/source/settings/CGameSettings.cpp +++ b/source/settings/CGameSettings.cpp @@ -46,7 +46,7 @@ CGameSettings::~CGameSettings() GameCFG * CGameSettings::GetGameCFG(const char * id) { if(!id) - return NULL; + return GetDefault(); for(u32 i = 0; i < GameList.size(); ++i) { @@ -56,7 +56,10 @@ GameCFG * CGameSettings::GetGameCFG(const char * id) } } - return NULL; + GameCFG *defaultCFG = GetDefault(); + memcpy(defaultCFG->id, id, 6); + + return defaultCFG; } bool CGameSettings::AddGame(const GameCFG & NewGame) @@ -418,7 +421,7 @@ GameCFG * CGameSettings::GetDefault() DefaultConfig.loadalternatedol = ALT_DOL_DEFAULT; DefaultConfig.alternatedolstart = 0; DefaultConfig.iosreloadblock = OFF; - memset(DefaultConfig.alternatedolname, 0, sizeof(DefaultConfig.alternatedolname)); + DefaultConfig.alternatedolname[0] = '\0'; DefaultConfig.returnTo = 1; DefaultConfig.Locked = OFF; diff --git a/source/settings/menus/GameLoadSM.cpp b/source/settings/menus/GameLoadSM.cpp index 783f216e..bfbb1978 100644 --- a/source/settings/menus/GameLoadSM.cpp +++ b/source/settings/menus/GameLoadSM.cpp @@ -91,15 +91,7 @@ static const char * AlternateDOLText[] = GameLoadSM::GameLoadSM(const char * GameID) : SettingsMenu(tr("Game Load"), &GuiOptions, MENU_NONE) { - //! Setup default settings from global settings - snprintf(GameConfig.id, sizeof(GameConfig.id), "%s", (char *) GameID); - SetDefaultConfig(); - - GameCFG * existCFG = GameSettings.GetGameCFG(GameID); - - //! Overwrite with existing if available - if (existCFG) - memcpy(&GameConfig, existCFG, sizeof(GameCFG)); + memcpy(&GameConfig, GameSettings.GetGameCFG(GameID), sizeof(GameCFG)); if(!btnOutline) btnOutline = Resources::GetImageData("button_dialogue_box.png"); diff --git a/source/settings/menus/ParentalControlSM.cpp b/source/settings/menus/ParentalControlSM.cpp index d7c81a9c..dfde31dc 100644 --- a/source/settings/menus/ParentalControlSM.cpp +++ b/source/settings/menus/ParentalControlSM.cpp @@ -232,6 +232,12 @@ int ParentalControlSM::GetMenuInternal() Settings.ParentalBlocks ^= BLOCK_LOADER_SETTINGS; } + //! Settings: Block Parental Settings + else if (ret == ++Idx) + { + Settings.ParentalBlocks ^= BLOCK_PARENTAL_SETTINGS; + } + //! Settings: Block Sound Settings else if (ret == ++Idx) {