mirror of
https://github.com/wiidev/usbloadergx.git
synced 2024-11-17 16:59:17 +01:00
Fix no SD bug and other stuff
This commit is contained in:
parent
e42e38eca2
commit
4a0c038708
File diff suppressed because one or more lines are too long
@ -1169,7 +1169,7 @@ bool cfg_load_games()
|
||||
|
||||
bool cfg_load_game_num()
|
||||
{
|
||||
return cfg_parsefile("SD:/config/GXGameCount.cfg", &game_set_num);
|
||||
return cfg_parsefile("SD:/config/GXGameFavorites.cfg", &game_set_num);
|
||||
}
|
||||
|
||||
bool cfg_save_games()// save per game setings
|
||||
@ -1208,9 +1208,9 @@ bool cfg_save_game_num()
|
||||
FILE *f;
|
||||
int i;
|
||||
mkdir("SD:/config/", 0777);
|
||||
f = fopen("SD:/config/GXGameCount.cfg", "wb");
|
||||
f = fopen("SD:/config/GXGameFavorites.cfg", "wb");
|
||||
if (!f) {
|
||||
printf("Error saving %s\n", "GXGameCount.cfg");
|
||||
printf("Error saving %s\n", "GXGameFavorites.cfg");
|
||||
sleep(1);
|
||||
return false;
|
||||
}
|
||||
|
@ -1299,6 +1299,27 @@ int GameWindowPrompt()
|
||||
Sys_Reboot();
|
||||
|
||||
if(btn1.GetState() == STATE_CLICKED) { //boot
|
||||
//////////save game play count////////////////
|
||||
extern u8 favorite;
|
||||
extern u8 count;
|
||||
struct Game_NUM* game_num = CFG_get_game_num(header->id);
|
||||
if (game_num)
|
||||
{
|
||||
favorite = game_num->favorite;
|
||||
count = game_num->count;//count+=1;
|
||||
}count+=1;
|
||||
if(isSdInserted() == 1) {
|
||||
if (CFG_save_game_num(header->id))
|
||||
{
|
||||
//WindowPrompt(LANGUAGE.SuccessfullySaved, 0, LANGUAGE.ok, 0,0,0);
|
||||
}
|
||||
else
|
||||
{
|
||||
//WindowPrompt(LANGUAGE.SaveFailed, 0, LANGUAGE.ok, 0,0,0);
|
||||
}
|
||||
}
|
||||
////////////end save play count//////////////
|
||||
|
||||
choice = 1;
|
||||
SDCard_deInit();
|
||||
}
|
||||
@ -3253,8 +3274,6 @@ static int MenuDiscList()
|
||||
{
|
||||
WindowPrompt(LANGUAGE.SaveFailed, 0, LANGUAGE.ok, 0,0,0);
|
||||
}
|
||||
} else {
|
||||
WindowPrompt(LANGUAGE.NoSDcardinserted, LANGUAGE.InsertaSDCardtosave, LANGUAGE.ok, 0,0,0);
|
||||
}
|
||||
////////////end save play count//////////////
|
||||
|
||||
@ -3353,36 +3372,8 @@ static int MenuDiscList()
|
||||
{
|
||||
|
||||
wiilight(0);
|
||||
//////////save game play count////////////////
|
||||
extern u8 favorite;
|
||||
extern u8 count;
|
||||
struct Game_NUM* game_num = CFG_get_game_num(header->id);
|
||||
|
||||
if (game_num)
|
||||
{
|
||||
favorite = game_num->favorite;
|
||||
count = game_num->count;//count+=1;
|
||||
|
||||
}count+=1;
|
||||
|
||||
|
||||
if(isSdInserted() == 1) {
|
||||
if (CFG_save_game_num(header->id))
|
||||
{
|
||||
//WindowPrompt(LANGUAGE.SuccessfullySaved, 0, LANGUAGE.ok, 0,0,0);
|
||||
}
|
||||
else
|
||||
{
|
||||
WindowPrompt(LANGUAGE.SaveFailed, 0, LANGUAGE.ok, 0,0,0);
|
||||
}
|
||||
} else {
|
||||
WindowPrompt(LANGUAGE.NoSDcardinserted, LANGUAGE.InsertaSDCardtosave, LANGUAGE.ok, 0,0,0);
|
||||
}
|
||||
////////////end save play count//////////////
|
||||
|
||||
struct Game_CFG* game_cfg = CFG_get_game_opt(header->id);
|
||||
|
||||
if (game_cfg)//if there are saved settings for this game use them
|
||||
struct Game_CFG* game_cfg = CFG_get_game_opt(header->id);
|
||||
if (game_cfg)//if there are saved settings for this game use them
|
||||
{
|
||||
iosChoice = game_cfg->ios;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user