mirror of
https://github.com/dborth/vbagx.git
synced 2024-11-25 20:16:53 +01:00
code tidy
This commit is contained in:
parent
46efa8c104
commit
607d5d0f97
@ -929,19 +929,7 @@ bool LoadGBROM()
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
int device = GCSettings.LoadMethod;
|
gbRomSize = LoadSzFile(szpath, (unsigned char *)gbRom);
|
||||||
|
|
||||||
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)
|
if(gbRomSize <= 0)
|
||||||
|
@ -268,7 +268,7 @@ int VMCPULoadROM()
|
|||||||
char filepath[MAXPATHLEN];
|
char filepath[MAXPATHLEN];
|
||||||
|
|
||||||
if(!MakeFilePath(filepath, FILE_ROM))
|
if(!MakeFilePath(filepath, FILE_ROM))
|
||||||
return false;
|
return 0;
|
||||||
|
|
||||||
// loading compressed files via VM is not supported
|
// loading compressed files via VM is not supported
|
||||||
if(!utilIsGBAImage(filepath))
|
if(!utilIsGBAImage(filepath))
|
||||||
@ -304,9 +304,8 @@ int VMCPULoadROM()
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
struct stat fileinfo;
|
fseeko(romfile,0,SEEK_END);
|
||||||
fstat(romfile->_file, &fileinfo);
|
GBAROMSize = ftello(romfile);
|
||||||
GBAROMSize = fileinfo.st_size;
|
|
||||||
|
|
||||||
vmpageno = 0;
|
vmpageno = 0;
|
||||||
vmpage[0].pageptr = rombase;
|
vmpage[0].pageptr = rombase;
|
||||||
|
Loading…
Reference in New Issue
Block a user