mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2026-10-01 14:47:02 -05:00
Merge pull request #2519 from JosJuice/volume-type-enum
Volume: Return volume type as an enum
This commit is contained in:
@@ -243,7 +243,7 @@ bool CBoot::BootUp()
|
||||
|
||||
const DiscIO::IVolume& pVolume = DVDInterface::GetVolume();
|
||||
|
||||
if (pVolume.IsWiiDisc() != _StartupPara.bWii)
|
||||
if ((pVolume.GetVolumeType() == DiscIO::IVolume::WII_DISC) != _StartupPara.bWii)
|
||||
{
|
||||
PanicAlertT("Warning - starting ISO in wrong console mode!");
|
||||
}
|
||||
@@ -259,7 +259,7 @@ bool CBoot::BootUp()
|
||||
WII_IPC_HLE_Interface::ES_DIVerify(tmd_buf.get(), tmd_size);
|
||||
}
|
||||
|
||||
_StartupPara.bWii = pVolume.IsWiiDisc();
|
||||
_StartupPara.bWii = pVolume.GetVolumeType() == DiscIO::IVolume::WII_DISC;
|
||||
|
||||
// HLE BS2 or not
|
||||
if (_StartupPara.bHLE_BS2)
|
||||
@@ -318,7 +318,8 @@ bool CBoot::BootUp()
|
||||
{
|
||||
BS2Success = EmulatedBS2(dolWii);
|
||||
}
|
||||
else if ((!DVDInterface::VolumeIsValid() || !DVDInterface::GetVolume().IsWiiDisc()) && !_StartupPara.m_strDefaultISO.empty())
|
||||
else if ((!DVDInterface::VolumeIsValid() || DVDInterface::GetVolume().GetVolumeType() != DiscIO::IVolume::WII_DISC) &&
|
||||
!_StartupPara.m_strDefaultISO.empty())
|
||||
{
|
||||
DVDInterface::SetVolumeName(_StartupPara.m_strDefaultISO);
|
||||
BS2Success = EmulatedBS2(dolWii);
|
||||
|
||||
@@ -321,7 +321,7 @@ bool CBoot::EmulatedBS2_Wii()
|
||||
|
||||
// Execute the apploader
|
||||
bool apploaderRan = false;
|
||||
if (DVDInterface::VolumeIsValid() && DVDInterface::GetVolume().IsWiiDisc())
|
||||
if (DVDInterface::VolumeIsValid() && DVDInterface::GetVolume().GetVolumeType() == DiscIO::IVolume::WII_DISC)
|
||||
{
|
||||
// This is some kind of consistency check that is compared to the 0x00
|
||||
// values as the game boots. This location keep the 4 byte ID for as long
|
||||
|
||||
@@ -184,7 +184,7 @@ bool SCoreStartupParameter::AutoSetup(EBootBS2 _BootBS2)
|
||||
m_revision = pVolume->GetRevision();
|
||||
|
||||
// Check if we have a Wii disc
|
||||
bWii = pVolume.get()->IsWiiDisc();
|
||||
bWii = pVolume.get()->GetVolumeType() == DiscIO::IVolume::WII_DISC;
|
||||
|
||||
const char* retrieved_region_dir = GetRegionOfCountry(pVolume->GetCountry());
|
||||
if (!retrieved_region_dir)
|
||||
|
||||
@@ -1434,7 +1434,7 @@ s64 CalculateRawDiscReadTime(u64 offset, s64 length)
|
||||
// Note that the speed at a track (in bytes per second) is the same as
|
||||
// the radius of that track because of the length unit used.
|
||||
double speed;
|
||||
if (s_inserted_volume->IsWiiDisc())
|
||||
if (s_inserted_volume->GetVolumeType() == DiscIO::IVolume::WII_DISC)
|
||||
{
|
||||
speed = std::sqrt(((average_offset - WII_DISC_LOCATION_1_OFFSET) /
|
||||
WII_BYTES_PER_AREA_UNIT + WII_DISC_AREA_UP_TO_LOCATION_1) / PI);
|
||||
|
||||
Reference in New Issue
Block a user