Check if the game's ID is valid before accessing it to set the ntsc u/j register. Prevents discs without a real ID from crashing dolphin.
This commit is contained in:
parent
ff6023df27
commit
cf52029b51
|
@ -227,7 +227,9 @@ bool CBoot::BootUp()
|
||||||
// setup the map from ISOFile ID
|
// setup the map from ISOFile ID
|
||||||
VolumeHandler::SetVolumeName(_StartupPara.m_strFilename);
|
VolumeHandler::SetVolumeName(_StartupPara.m_strFilename);
|
||||||
|
|
||||||
VideoInterface::SetRegionReg((char)VolumeHandler::GetVolume()->GetUniqueID().at(3));
|
std::string unique_id = VolumeHandler::GetVolume()->GetUniqueID();
|
||||||
|
if (unique_id.size() >= 3)
|
||||||
|
VideoInterface::SetRegionReg(unique_id.at(3));
|
||||||
|
|
||||||
DVDInterface::SetDiscInside(VolumeHandler::IsValid());
|
DVDInterface::SetDiscInside(VolumeHandler::IsValid());
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue