Added an error message to account for FDS BIOS files that aren't exactly 0x2000 bytes in size. The 40k copy floating around shouldn't cause unannounced errors anymore.

This commit is contained in:
ugetab 2010-04-24 15:54:34 +00:00
parent 297d2f2d55
commit 5600ba096b
2 changed files with 9 additions and 1 deletions

View File

@ -120,7 +120,6 @@ BOOL CALLBACK GUIConCallB(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lParam)
}
GetModuleFileName(0, ManifestFilePath, 2048);
//std::string TestFilepath = tempfilepath;
strcat((char*)ManifestFilePath,".manifest");

View File

@ -793,6 +793,15 @@ int FDSLoad(const char *name, FCEUFILE *fp)
free(fn);
fseek( zp, 0L, SEEK_END );
if (ftell( zp ) != 8192 ) {
fclose(zp);
FreeFDSMemory();
FCEU_PrintError("FDS BIOS ROM image incompatible: %s", FCEU_MakeFName(FCEUMKF_FDSROM,0,0).c_str());
return 0;
}
fseek( zp, 0L, SEEK_SET );
if(fread(FDSBIOS,1,8192,zp)!=8192)
{
fclose(zp);