mirror of
https://github.com/jpd002/Play-.git
synced 2025-04-28 13:47:57 +03:00
Report error if HDD image file doesn't have the proper sector size.
This commit is contained in:
parent
0621599628
commit
e70ee1608f
1 changed files with 5 additions and 1 deletions
|
@ -56,7 +56,11 @@ void CNamcoSys246Driver::PrepareEnvironment(CPS2VM* virtualMachine, const ARCADE
|
|||
}
|
||||
|
||||
auto imageStream = std::make_unique<CChdImageStream>(std::make_unique<Framework::CStdStream>(hddPath.string().c_str(), "rb"));
|
||||
assert(imageStream->GetUnitSize() == Hdd::g_sectorSize);
|
||||
if(imageStream->GetUnitSize() != Hdd::g_sectorSize)
|
||||
{
|
||||
throw std::runtime_error(string_format("Sector size mismatch in HDD image file ('%s'). Make sure the CHD file was created with the 'createhd' option.", def.hddFileName.c_str()));
|
||||
}
|
||||
|
||||
auto device = std::make_shared<Iop::Ioman::CHardDiskDumpDevice>(std::move(imageStream));
|
||||
|
||||
auto iopBios = dynamic_cast<CIopBios*>(virtualMachine->m_iop->m_bios.get());
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue