mirror of
https://github.com/wiidev/usbloadergx.git
synced 2024-11-20 02:09:16 +01:00
made a function to delete game statistics & favorite choice.
Removed game settings and game statistics when a game is deleted from the drive.
This commit is contained in:
parent
bf12b2f997
commit
db9df14d66
@ -1996,7 +1996,10 @@ int GameSettings(struct discHdr * header)
|
|||||||
|
|
||||||
if (choice == 1)
|
if (choice == 1)
|
||||||
{
|
{
|
||||||
ret = WBFS_RemoveGame(header->id);
|
CFG_forget_game_opt(header->id);
|
||||||
|
CFG_forget_game_num(header->id);
|
||||||
|
|
||||||
|
/*ret = WBFS_RemoveGame(header->id);
|
||||||
if (ret < 0)
|
if (ret < 0)
|
||||||
{
|
{
|
||||||
WindowPrompt(
|
WindowPrompt(
|
||||||
@ -2011,7 +2014,7 @@ int GameSettings(struct discHdr * header)
|
|||||||
gameName,
|
gameName,
|
||||||
LANGUAGE.ok,0,0,0);
|
LANGUAGE.ok,0,0,0);
|
||||||
retVal = 1;
|
retVal = 1;
|
||||||
}
|
}*/
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
else if (choice == 0)
|
else if (choice == 0)
|
||||||
|
@ -1570,6 +1570,20 @@ bool CFG_forget_game_opt(u8 *id)
|
|||||||
return cfg_save_games();
|
return cfg_save_games();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
bool CFG_forget_game_num(u8 *id)
|
||||||
|
{
|
||||||
|
struct Game_NUM *game = CFG_get_game_num(id);
|
||||||
|
int i;
|
||||||
|
if (!game) return true;
|
||||||
|
// move entries down
|
||||||
|
num_saved_game_num--;
|
||||||
|
for (i=game-cfg_game_num; i<num_saved_game_num; i++) {
|
||||||
|
cfg_game[i] = cfg_game[i+1];
|
||||||
|
}
|
||||||
|
memset(&cfg_game[num_saved_game_num], 0, sizeof(struct Game_NUM));
|
||||||
|
return cfg_save_game_num();
|
||||||
|
}
|
||||||
|
|
||||||
void CFG_LoadXml(bool openfile, bool loadtitles, bool freemem)
|
void CFG_LoadXml(bool openfile, bool loadtitles, bool freemem)
|
||||||
{
|
{
|
||||||
/* load renamed titles from proper names and game info XML, needs to be after cfg_load_games - Lustar */
|
/* load renamed titles from proper names and game info XML, needs to be after cfg_load_games - Lustar */
|
||||||
|
@ -197,6 +197,7 @@ struct Game_NUM* CFG_get_game_num(u8 *id);
|
|||||||
bool CFG_save_game_opt(u8 *id);
|
bool CFG_save_game_opt(u8 *id);
|
||||||
bool CFG_save_game_num(u8 *id);
|
bool CFG_save_game_num(u8 *id);
|
||||||
bool CFG_forget_game_opt(u8 *id);
|
bool CFG_forget_game_opt(u8 *id);
|
||||||
|
bool CFG_forget_game_num(u8 *id);
|
||||||
|
|
||||||
//Astidof - Begin of modification
|
//Astidof - Begin of modification
|
||||||
enum {
|
enum {
|
||||||
|
Loading…
Reference in New Issue
Block a user