diff --git a/Source/Core/Core/Boot/Boot.cpp b/Source/Core/Core/Boot/Boot.cpp index f7dd454484..53718ab03c 100644 --- a/Source/Core/Core/Boot/Boot.cpp +++ b/Source/Core/Core/Boot/Boot.cpp @@ -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()) { diff --git a/Source/Core/Core/Boot/Boot_BS2Emu.cpp b/Source/Core/Core/Boot/Boot_BS2Emu.cpp index e320d93e71..cd5742b56f 100644 --- a/Source/Core/Core/Boot/Boot_BS2Emu.cpp +++ b/Source/Core/Core/Boot/Boot_BS2Emu.cpp @@ -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) diff --git a/Source/Core/Core/HW/DVDInterface.cpp b/Source/Core/Core/HW/DVDInterface.cpp index 95835b722f..679ac51cf9 100644 --- a/Source/Core/Core/HW/DVDInterface.cpp +++ b/Source/Core/Core/HW/DVDInterface.cpp @@ -419,7 +419,7 @@ static void DTKStreamingCallback(const std::vector& 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() diff --git a/Source/Core/Core/HW/DVDInterface.h b/Source/Core/Core/HW/DVDInterface.h index fb6c97aea5..64c4bc1efb 100644 --- a/Source/Core/Core/HW/DVDInterface.h +++ b/Source/Core/Core/HW/DVDInterface.h @@ -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