Explicitly log when PSX BIOS is missing.

FileStream doesn't have an open() call, so use exceptions.
This commit is contained in:
Themaister 2013-09-25 15:06:01 +02:00
parent 73850f73bb
commit 8aa91fecdf

View File

@ -1480,9 +1480,18 @@ static bool InitCommon(std::vector<CDIF *> *CDInterfaces, const bool EmulateMemc
{
std::string biospath = MDFN_MakeFName(MDFNMKF_FIRMWARE, 0, MDFN_GetSettingS(biospath_sname).c_str());
FileStream BIOSFile(biospath.c_str(), FileStream::MODE_READ);
BIOSFile.read(BIOSROM->data8, 512 * 1024);
try
{
FileStream BIOSFile(biospath.c_str(), FileStream::MODE_READ);
BIOSFile.read(BIOSROM->data8, 512 * 1024);
}
catch(...)
{
#ifdef __LIBRETRO__
fprintf(stderr, "FATAL: Did not find PSX BIOS: %s.\nPlace the BIOS in the system directory.\n", biospath.c_str());
#endif
return(false);
}
}
for(int i = 0; i < 8; i++)