fixed Ocarina issue 689

This commit is contained in:
thedarkness1981 2009-07-15 02:01:10 +00:00
parent 1d48d64f72
commit e9ba1a1a0e

View File

@ -1110,18 +1110,24 @@ int MenuDiscList()
/* Open gct File and check exist */
sprintf(nipple, "%s%s.gct",Settings.Cheatcodespath,IDfull);
exeFile = fopen (nipple ,"rb");
if (exeFile==NULL)
{
sprintf(nipple, "%s %s",nipple,tr("does not exist! Loading game without cheats."));
WindowPrompt(tr("Error"),nipple,NULL,NULL,NULL,NULL,170);
}
else
{
fseek (exeFile, 0, SEEK_END);
long size=ftell (exeFile);
rewind (exeFile);
if (size>2056){
sprintf(nipple, "%s %s",nipple,tr("contains over 255 lines of code. It will produce unexpected results."));
WindowPrompt(tr("Error"),nipple,NULL,NULL,NULL,NULL,170);
}if (exeFile==NULL)
{
sprintf(nipple, "%s %s",nipple,tr("does not exist! Loading game without cheats."));
WindowPrompt(tr("Error"),nipple,tr("OK"),NULL,NULL,NULL,170);
}
}
}
SDCard_deInit();
wiilight(0);
if(isInserted(bootDevice)) {
@ -1172,18 +1178,25 @@ int MenuDiscList()
/* Open gct File and check exist */
sprintf(nipple, "%s%s.gct",Settings.Cheatcodespath,IDfull);
exeFile = fopen (nipple ,"rb");
fseek (exeFile, 0, SEEK_END);
long size=ftell (exeFile);
rewind (exeFile);
if (size>2056){
sprintf(nipple, "%s %s",nipple,tr("contains over 255 lines of code. It will produce unexpected results."));
WindowPrompt(tr("Error"),nipple,NULL,NULL,NULL,NULL,170);
}if (exeFile==NULL)
if (exeFile==NULL)
{
sprintf(nipple, "%s %s",nipple,tr("does not exist! Loading game without cheats."));
WindowPrompt(tr("Error"),nipple,NULL,NULL,NULL,NULL,170);
}
} SDCard_deInit();
else
{
fseek (exeFile, 0, SEEK_END);
long size=ftell (exeFile);
rewind (exeFile);
fclose(exeFile);
if (size>2056){
sprintf(nipple, "%s %s",nipple,tr("contains over 255 lines of code. It will produce unexpected results."));
WindowPrompt(tr("Error"),nipple,NULL,NULL,NULL,NULL,170);
}
}
}
SDCard_deInit();
wiilight(0);
returnHere = false;
menu = MENU_EXIT;