diff --git a/HBC/META.XML b/HBC/META.XML index 8f0a1780..32da4218 100644 --- a/HBC/META.XML +++ b/HBC/META.XML @@ -2,8 +2,8 @@ USB Loader GX USB Loader GX Team - 1.0 r971 - 201009241958 + 1.0 r972 + 201009242132 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. The interactive GUI is completely controllable with WiiMote, Classic Controller or GC Controller. diff --git a/source/settings/CGameSettings.cpp b/source/settings/CGameSettings.cpp index ee8a50f0..4a7aab2e 100644 --- a/source/settings/CGameSettings.cpp +++ b/source/settings/CGameSettings.cpp @@ -93,13 +93,13 @@ bool CGameSettings::AddGame(const GameCFG * NewGame) if(strncmp(NewGame->id, GameList[i].id, 6) == 0) { memcpy(&GameList[i], NewGame, sizeof(GameCFG)); - return Save(); + return true; } } GameList.push_back(*NewGame); - return Save(); + return true; } bool CGameSettings::RemoveAll() @@ -124,7 +124,7 @@ bool CGameSettings::Remove(const char * id) } } - return Save(); + return true; } bool CGameSettings::Load(const char * path) @@ -341,12 +341,10 @@ void CGameSettings::ParseLine(char *line) if(!ReadGameID(line, GameID, 6)) return; - int pos = GameList.size(); + GameCFG NewCFG; + memset(&NewCFG, 0, sizeof(GameCFG)); - GameList.resize(pos+1); - memset(&GameList[pos], 0, sizeof(GameCFG)); - - strcpy(GameList[pos].id, GameID); + strcpy(NewCFG.id, GameID); char * LinePtr = strchr(line, '='); @@ -361,10 +359,12 @@ void CGameSettings::ParseLine(char *line) this->TrimLine(name, LinePtr, sizeof(name)); this->TrimLine(value, eq + 1, sizeof(value)); - SetSetting(GameList[pos], name, value); + SetSetting(NewCFG, name, value); LinePtr = strchr(LinePtr, ';'); } + + AddGame(&NewCFG); } void CGameSettings::TrimLine(char *dest, const char *src, int size) diff --git a/source/settings/CSettings.cpp b/source/settings/CSettings.cpp index 96840b5c..2cc37716 100644 --- a/source/settings/CSettings.cpp +++ b/source/settings/CSettings.cpp @@ -207,8 +207,8 @@ bool CSettings::Save() fprintf(file, "quickboot = %d\n ", quickboot); fprintf(file, "wsprompt = %d\n ", wsprompt); fprintf(file, "parentalcontrol = %d\n ", parentalcontrol); - fprintf(file, "cover_path = %s\n ", covers_path); - fprintf(file, "cover2d_path = %s\n ", covers2d_path); + fprintf(file, "covers_path = %s\n ", covers_path); + fprintf(file, "covers2d_path = %s\n ", covers2d_path); fprintf(file, "theme_path = %s\n ", theme_path); fprintf(file, "disc_path = %s\n ", disc_path); fprintf(file, "language_path = %s\n ", language_path); @@ -235,8 +235,8 @@ bool CSettings::Save() fprintf(file, "discart = %d\n ", discart); fprintf(file, "partition = %d\n ", partition); fprintf(file, "marknewtitles = %d\n ", marknewtitles); - fprintf(file, "fatInstallToDir = %d\n ", FatInstallToDir); - fprintf(file, "partitions = %d\n ", partitions_to_install); + fprintf(file, "FatInstallToDir = %d\n ", FatInstallToDir); + fprintf(file, "partitions_to_install = %d\n ", partitions_to_install); fprintf(file, "fullcopy = %d\n ", fullcopy); fprintf(file, "beta_upgrades = %d\n ", beta_upgrades); fprintf(file, "returnTo = %s\n ", returnTo); @@ -337,7 +337,7 @@ bool CSettings::SetSetting(char *name, char *value) } return true; } - else if (strcmp(name, "unlockCode") == 0) + else if (strcmp(name, "password") == 0) { strcpy(unlockCode, value); return true; diff --git a/source/settings/Settings.cpp b/source/settings/Settings.cpp index 5216e8d1..971efb0a 100644 --- a/source/settings/Settings.cpp +++ b/source/settings/Settings.cpp @@ -2602,7 +2602,7 @@ int MenuGameSettings(struct discHdr * header) else if (saveBtn.GetState() == STATE_CLICKED) { - if (GameSettings.AddGame(&game_cfg)) + if (GameSettings.AddGame(&game_cfg) && GameSettings.Save()) { WindowPrompt(tr( "Successfully Saved" ), 0, tr( "OK" )); } @@ -2905,6 +2905,7 @@ int MenuGameSettings(struct discHdr * header) if (choice1 == 1 && !mountMethod) { GameSettings.Remove(header->id); + GameSettings.Save(); CFG_forget_game_num(header->id); ret = WBFS_RemoveGame(header->id); if (ret < 0) @@ -3049,6 +3050,7 @@ int MenuGameSettings(struct discHdr * header) strcpy(game_cfg.alternatedolname, ""); game_cfg.returnTo = 1; GameSettings.Remove(header->id); + GameSettings.Save(); } pageToDisplay = 1;