-added another case to see if usb game is

already installed on sd
-fixed some really stupid error from previous
rev which said game is not on sd card
(I should always test before commit...)
This commit is contained in:
fix94.1 2012-03-05 10:01:07 +00:00
parent b23d86b5bc
commit d0840c4ecb
2 changed files with 6 additions and 8 deletions

View File

@ -100,7 +100,7 @@ bool DML_GameIsInstalled(char *discid, const char* partition)
char folder[12];
char source[300];
snprintf(folder, sizeof(folder), DML_DIR, partition);
snprintf(source, sizeof(source), "%s/%s", folder, discid);
snprintf(source, sizeof(source), "%s/%s/game.iso", folder, discid);
FILE *f = fopen(source, "r");
if (f)

View File

@ -451,12 +451,12 @@ void CMenu::_game(bool launch)
memset(hdr->path,0,sizeof(hdr->path));
sprintf(hdr->path,"%s",(char*)hdr->hdr.id);
}
else if (DML_GameIsInstalled(gcfolder, DeviceName[SD]))
else if(DML_GameIsInstalled(gcfolder, DeviceName[SD]))
{
memset(hdr->path,0,sizeof(hdr->path));
sprintf(hdr->path,"%s",gcfolder);
}
else if(!_wbfsOp(CMenu::WO_COPY_GAME))
else if(!DML_GameIsInstalled(hdr->path, DeviceName[SD]) && !_wbfsOp(CMenu::WO_COPY_GAME))
break;
currentPartition = SD;
}
@ -593,7 +593,6 @@ void CMenu::_directlaunch(const string &id)
_launch(&m_gameList[0]); // Launch will exit wiiflow
}
}
error(sfmt("Cannot find the game with ID: %s", id.c_str()));
}
@ -655,7 +654,6 @@ void CMenu::_launchGC(dir_discHdr *hdr, bool DML)
GClanguage = min((u32)m_cfg.getInt("DML", "game_language", 0), ARRAY_SIZE(CMenu::_GlobalGClanguages) - 1u);
else
GClanguage--;
gprintf("gc lang: %i; %i\n",GClanguage, m_cfg.getInt("DML", "game_language", 0));
m_cfg.setString("DML", "current_item", (char *)hdr->hdr.id);
m_gcfg1.setInt("PLAYCOUNT", (char *)hdr->hdr.id, m_gcfg1.getInt("PLAYCOUNT", (char *)hdr->hdr.id, 0) + 1);