mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2024-11-15 13:57:57 -07:00
DVDInterface: Remove VolumeIsValid
It's the same as IsDiscInside.
This commit is contained in:
parent
3b632f5990
commit
a176bf0229
@ -50,7 +50,7 @@ bool CBoot::DVDRead(u64 dvd_offset, u32 output_address, u32 length, bool decrypt
|
||||
|
||||
void CBoot::Load_FST(bool _bIsWii)
|
||||
{
|
||||
if (!DVDInterface::VolumeIsValid())
|
||||
if (!DVDInterface::IsDiscInside())
|
||||
return;
|
||||
|
||||
const DiscIO::IVolume& volume = DVDInterface::GetVolume();
|
||||
@ -267,7 +267,7 @@ bool CBoot::BootUp()
|
||||
case SConfig::BOOT_ISO:
|
||||
{
|
||||
DVDInterface::SetVolumeName(_StartupPara.m_strFilename);
|
||||
if (!DVDInterface::VolumeIsValid())
|
||||
if (!DVDInterface::IsDiscInside())
|
||||
return false;
|
||||
|
||||
const DiscIO::IVolume& pVolume = DVDInterface::GetVolume();
|
||||
@ -336,7 +336,7 @@ bool CBoot::BootUp()
|
||||
{
|
||||
BS2Success = EmulatedBS2(dolWii);
|
||||
}
|
||||
else if ((!DVDInterface::VolumeIsValid() ||
|
||||
else if ((!DVDInterface::IsDiscInside() ||
|
||||
DVDInterface::GetVolume().GetVolumeType() != DiscIO::Platform::WII_DISC) &&
|
||||
!_StartupPara.m_strDefaultISO.empty())
|
||||
{
|
||||
|
@ -67,7 +67,7 @@ bool CBoot::EmulatedBS2_GC(bool skipAppLoader)
|
||||
// to 0x80000000 according to YAGCD 4.2.
|
||||
|
||||
// It's possible to boot DOL and ELF files without a disc inserted
|
||||
if (DVDInterface::VolumeIsValid())
|
||||
if (DVDInterface::IsDiscInside())
|
||||
DVDRead(/*offset*/ 0x00000000, /*address*/ 0x00000000, 0x20, false); // write disc info
|
||||
|
||||
PowerPC::HostWrite_U32(0x0D15EA5E,
|
||||
@ -100,7 +100,7 @@ bool CBoot::EmulatedBS2_GC(bool skipAppLoader)
|
||||
|
||||
HLE::Patch(0x81300000, "OSReport"); // HLE OSReport for Apploader
|
||||
|
||||
if (!DVDInterface::VolumeIsValid())
|
||||
if (!DVDInterface::IsDiscInside())
|
||||
return false;
|
||||
|
||||
// Load Apploader to Memory - The apploader is hardcoded to begin at 0x2440 on the disc,
|
||||
@ -255,7 +255,7 @@ bool CBoot::SetupWiiMemory(u64 ios_title_id)
|
||||
*/
|
||||
|
||||
// When booting a WAD or the system menu, there will probably not be a disc inserted
|
||||
if (DVDInterface::VolumeIsValid())
|
||||
if (DVDInterface::IsDiscInside())
|
||||
DVDRead(0x00000000, 0x00000000, 0x20, false); // Game Code
|
||||
|
||||
Memory::Write_U32(0x0D15EA5E, 0x00000020); // Another magic word
|
||||
@ -306,7 +306,7 @@ bool CBoot::SetupWiiMemory(u64 ios_title_id)
|
||||
bool CBoot::EmulatedBS2_Wii()
|
||||
{
|
||||
INFO_LOG(BOOT, "Faking Wii BS2...");
|
||||
if (!DVDInterface::VolumeIsValid())
|
||||
if (!DVDInterface::IsDiscInside())
|
||||
return false;
|
||||
|
||||
if (DVDInterface::GetVolume().GetVolumeType() != DiscIO::Platform::WII_DISC)
|
||||
|
@ -419,7 +419,7 @@ static void DTKStreamingCallback(const std::vector<u8>& audio_data, s64 cycles_l
|
||||
|
||||
void Init()
|
||||
{
|
||||
_assert_(!VolumeIsValid());
|
||||
_assert_(!IsDiscInside());
|
||||
|
||||
DVDThread::Start();
|
||||
|
||||
@ -486,7 +486,7 @@ bool SetVolumeName(const std::string& disc_path)
|
||||
DVDThread::WaitUntilIdle();
|
||||
s_inserted_volume = DiscIO::CreateVolumeFromFilename(disc_path);
|
||||
SetLidOpen();
|
||||
return VolumeIsValid();
|
||||
return IsDiscInside();
|
||||
}
|
||||
|
||||
bool SetVolumeDirectory(const std::string& full_path, bool is_wii,
|
||||
@ -496,12 +496,7 @@ bool SetVolumeDirectory(const std::string& full_path, bool is_wii,
|
||||
s_inserted_volume =
|
||||
DiscIO::CreateVolumeFromDirectory(full_path, is_wii, apploader_path, DOL_path);
|
||||
SetLidOpen();
|
||||
return VolumeIsValid();
|
||||
}
|
||||
|
||||
bool VolumeIsValid()
|
||||
{
|
||||
return s_inserted_volume != nullptr;
|
||||
return IsDiscInside();
|
||||
}
|
||||
|
||||
bool IsDiscInside()
|
||||
|
@ -108,12 +108,11 @@ void DoState(PointerWrap& p);
|
||||
|
||||
void RegisterMMIO(MMIO::Mapping* mmio, u32 base);
|
||||
|
||||
// Disc access (don't call GetVolume unless you know that VolumeIsValid() == true)
|
||||
// Disc access (don't call GetVolume unless you know that IsDiscInside() == true)
|
||||
const DiscIO::IVolume& GetVolume();
|
||||
bool SetVolumeName(const std::string& disc_path);
|
||||
bool SetVolumeDirectory(const std::string& disc_path, bool is_wii,
|
||||
const std::string& apploader_path = "", const std::string& DOL_path = "");
|
||||
bool VolumeIsValid();
|
||||
bool IsDiscInside();
|
||||
void ChangeDiscAsHost(const std::string& new_path); // Can only be called by the host thread
|
||||
void ChangeDiscAsCPU(const std::string& new_path); // Can only be called by the CPU thread
|
||||
|
Loading…
Reference in New Issue
Block a user