code tidy

This commit is contained in:
dborth 2009-10-07 18:04:26 +00:00
parent 46efa8c104
commit 607d5d0f97
2 changed files with 4 additions and 17 deletions

View File

@ -929,19 +929,7 @@ bool LoadGBROM()
}
else
{
int device = GCSettings.LoadMethod;
switch (device)
{
case DEVICE_SD:
case DEVICE_USB:
case DEVICE_SMB:
gbRomSize = LoadSzFile(szpath, (unsigned char *)gbRom);
break;
case DEVICE_DVD:
gbRomSize = SzExtractFile(browserList[browser.selIndex].filenum, (unsigned char *)gbRom);
break;
}
}
if(gbRomSize <= 0)

View File

@ -268,7 +268,7 @@ int VMCPULoadROM()
char filepath[MAXPATHLEN];
if(!MakeFilePath(filepath, FILE_ROM))
return false;
return 0;
// loading compressed files via VM is not supported
if(!utilIsGBAImage(filepath))
@ -304,9 +304,8 @@ int VMCPULoadROM()
return 0;
}
struct stat fileinfo;
fstat(romfile->_file, &fileinfo);
GBAROMSize = fileinfo.st_size;
fseeko(romfile,0,SEEK_END);
GBAROMSize = ftello(romfile);
vmpageno = 0;
vmpage[0].pageptr = rombase;