mirror of
https://github.com/izzy2lost/dolphin.git
synced 2026-06-19 01:16:48 -07:00
DiscIO: Remove C/I/S prefixes from class names
These prefixes were inconsistent with the rest of Dolphin.
I'm also renaming VolumeWiiCrypted to VolumeWii because of 1113b13.
This commit is contained in:
@@ -192,7 +192,7 @@ static inline u32 GetPixel(u32* buffer, unsigned int x, unsigned int y)
|
||||
|
||||
static bool LoadBanner(std::string filename, u32* Banner)
|
||||
{
|
||||
std::unique_ptr<DiscIO::IVolume> pVolume(DiscIO::CreateVolumeFromFilename(filename));
|
||||
std::unique_ptr<DiscIO::Volume> pVolume(DiscIO::CreateVolumeFromFilename(filename));
|
||||
|
||||
if (pVolume != nullptr)
|
||||
{
|
||||
@@ -230,7 +230,7 @@ static bool LoadBanner(std::string filename, u32* Banner)
|
||||
|
||||
static int GetCountry(std::string filename)
|
||||
{
|
||||
std::unique_ptr<DiscIO::IVolume> pVolume(DiscIO::CreateVolumeFromFilename(filename));
|
||||
std::unique_ptr<DiscIO::Volume> pVolume(DiscIO::CreateVolumeFromFilename(filename));
|
||||
|
||||
if (pVolume != nullptr)
|
||||
{
|
||||
@@ -246,7 +246,7 @@ static int GetCountry(std::string filename)
|
||||
|
||||
static int GetPlatform(std::string filename)
|
||||
{
|
||||
std::unique_ptr<DiscIO::IVolume> pVolume(DiscIO::CreateVolumeFromFilename(filename));
|
||||
std::unique_ptr<DiscIO::Volume> pVolume(DiscIO::CreateVolumeFromFilename(filename));
|
||||
|
||||
if (pVolume != nullptr)
|
||||
{
|
||||
@@ -272,7 +272,7 @@ static std::string GetTitle(std::string filename)
|
||||
__android_log_print(ANDROID_LOG_WARN, DOLPHIN_TAG, "Getting Title for file: %s",
|
||||
filename.c_str());
|
||||
|
||||
std::unique_ptr<DiscIO::IVolume> pVolume(DiscIO::CreateVolumeFromFilename(filename));
|
||||
std::unique_ptr<DiscIO::Volume> pVolume(DiscIO::CreateVolumeFromFilename(filename));
|
||||
|
||||
if (pVolume != nullptr)
|
||||
{
|
||||
@@ -315,7 +315,7 @@ static std::string GetDescription(std::string filename)
|
||||
__android_log_print(ANDROID_LOG_WARN, DOLPHIN_TAG, "Getting Description for file: %s",
|
||||
filename.c_str());
|
||||
|
||||
std::unique_ptr<DiscIO::IVolume> volume(DiscIO::CreateVolumeFromFilename(filename));
|
||||
std::unique_ptr<DiscIO::Volume> volume(DiscIO::CreateVolumeFromFilename(filename));
|
||||
|
||||
if (volume != nullptr)
|
||||
{
|
||||
@@ -350,7 +350,7 @@ static std::string GetGameId(std::string filename)
|
||||
{
|
||||
__android_log_print(ANDROID_LOG_WARN, DOLPHIN_TAG, "Getting ID for file: %s", filename.c_str());
|
||||
|
||||
std::unique_ptr<DiscIO::IVolume> volume(DiscIO::CreateVolumeFromFilename(filename));
|
||||
std::unique_ptr<DiscIO::Volume> volume(DiscIO::CreateVolumeFromFilename(filename));
|
||||
if (volume == nullptr)
|
||||
return std::string();
|
||||
|
||||
@@ -364,7 +364,7 @@ static std::string GetCompany(std::string filename)
|
||||
__android_log_print(ANDROID_LOG_WARN, DOLPHIN_TAG, "Getting Company for file: %s",
|
||||
filename.c_str());
|
||||
|
||||
std::unique_ptr<DiscIO::IVolume> volume(DiscIO::CreateVolumeFromFilename(filename));
|
||||
std::unique_ptr<DiscIO::Volume> volume(DiscIO::CreateVolumeFromFilename(filename));
|
||||
if (volume == nullptr)
|
||||
return std::string();
|
||||
|
||||
@@ -377,7 +377,7 @@ static u64 GetFileSize(std::string filename)
|
||||
{
|
||||
__android_log_print(ANDROID_LOG_WARN, DOLPHIN_TAG, "Getting size of file: %s", filename.c_str());
|
||||
|
||||
std::unique_ptr<DiscIO::IVolume> volume(DiscIO::CreateVolumeFromFilename(filename));
|
||||
std::unique_ptr<DiscIO::Volume> volume(DiscIO::CreateVolumeFromFilename(filename));
|
||||
if (volume == nullptr)
|
||||
return -1;
|
||||
|
||||
|
||||
@@ -20,7 +20,7 @@ std::string MD5Sum(const std::string& file_path, std::function<bool(int)> report
|
||||
u64 read_offset = 0;
|
||||
mbedtls_md5_context ctx;
|
||||
|
||||
std::unique_ptr<DiscIO::IBlobReader> file(DiscIO::CreateBlobReader(file_path));
|
||||
std::unique_ptr<DiscIO::BlobReader> file(DiscIO::CreateBlobReader(file_path));
|
||||
u64 game_size = file->GetDataSize();
|
||||
|
||||
mbedtls_md5_starts(&ctx);
|
||||
|
||||
@@ -42,14 +42,14 @@
|
||||
// Inserts a disc into the emulated disc drive and returns a pointer to it.
|
||||
// The returned pointer must only be used while we are still booting,
|
||||
// because DVDThread can do whatever it wants to the disc after that.
|
||||
static const DiscIO::IVolume* SetDisc(std::unique_ptr<DiscIO::IVolume> volume)
|
||||
static const DiscIO::Volume* SetDisc(std::unique_ptr<DiscIO::Volume> volume)
|
||||
{
|
||||
const DiscIO::IVolume* pointer = volume.get();
|
||||
const DiscIO::Volume* pointer = volume.get();
|
||||
DVDInterface::SetDisc(std::move(volume));
|
||||
return pointer;
|
||||
}
|
||||
|
||||
bool CBoot::DVDRead(const DiscIO::IVolume& volume, u64 dvd_offset, u32 output_address, u32 length,
|
||||
bool CBoot::DVDRead(const DiscIO::Volume& volume, u64 dvd_offset, u32 output_address, u32 length,
|
||||
const DiscIO::Partition& partition)
|
||||
{
|
||||
std::vector<u8> buffer(length);
|
||||
@@ -59,7 +59,7 @@ bool CBoot::DVDRead(const DiscIO::IVolume& volume, u64 dvd_offset, u32 output_ad
|
||||
return true;
|
||||
}
|
||||
|
||||
void CBoot::Load_FST(bool is_wii, const DiscIO::IVolume* volume)
|
||||
void CBoot::Load_FST(bool is_wii, const DiscIO::Volume* volume)
|
||||
{
|
||||
if (!volume)
|
||||
return;
|
||||
@@ -113,8 +113,8 @@ bool CBoot::FindMapFile(std::string* existing_map_file, std::string* writable_ma
|
||||
{
|
||||
case SConfig::BOOT_WII_NAND:
|
||||
{
|
||||
const DiscIO::CNANDContentLoader& Loader =
|
||||
DiscIO::CNANDContentManager::Access().GetNANDLoader(_StartupPara.m_strFilename);
|
||||
const DiscIO::NANDContentLoader& Loader =
|
||||
DiscIO::NANDContentManager::Access().GetNANDLoader(_StartupPara.m_strFilename);
|
||||
if (Loader.IsValid())
|
||||
{
|
||||
u64 TitleID = Loader.GetTMD().GetTitleId();
|
||||
@@ -290,7 +290,7 @@ bool CBoot::BootUp()
|
||||
{
|
||||
case SConfig::BOOT_ISO:
|
||||
{
|
||||
const DiscIO::IVolume* volume =
|
||||
const DiscIO::Volume* volume =
|
||||
SetDisc(DiscIO::CreateVolumeFromFilename(_StartupPara.m_strFilename));
|
||||
|
||||
if (!volume)
|
||||
@@ -343,7 +343,7 @@ bool CBoot::BootUp()
|
||||
PanicAlertT("Warning - starting DOL in wrong console mode!");
|
||||
}
|
||||
|
||||
const DiscIO::IVolume* volume = nullptr;
|
||||
const DiscIO::Volume* volume = nullptr;
|
||||
if (!_StartupPara.m_strDVDRoot.empty())
|
||||
{
|
||||
NOTICE_LOG(BOOT, "Setting DVDRoot %s", _StartupPara.m_strDVDRoot.c_str());
|
||||
@@ -385,7 +385,7 @@ bool CBoot::BootUp()
|
||||
|
||||
case SConfig::BOOT_ELF:
|
||||
{
|
||||
const DiscIO::IVolume* volume = nullptr;
|
||||
const DiscIO::Volume* volume = nullptr;
|
||||
|
||||
// load image or create virtual drive from directory
|
||||
if (!_StartupPara.m_strDVDRoot.empty())
|
||||
|
||||
@@ -11,7 +11,7 @@
|
||||
|
||||
namespace DiscIO
|
||||
{
|
||||
class IVolume;
|
||||
class Volume;
|
||||
struct Partition;
|
||||
}
|
||||
|
||||
@@ -46,7 +46,7 @@ public:
|
||||
static bool LoadMapFromFilename();
|
||||
|
||||
private:
|
||||
static bool DVDRead(const DiscIO::IVolume& volume, u64 dvd_offset, u32 output_address, u32 length,
|
||||
static bool DVDRead(const DiscIO::Volume& volume, u64 dvd_offset, u32 output_address, u32 length,
|
||||
const DiscIO::Partition& partition);
|
||||
static void RunFunction(u32 address);
|
||||
|
||||
@@ -57,12 +57,12 @@ private:
|
||||
|
||||
static void SetupMSR();
|
||||
static void SetupBAT(bool is_wii);
|
||||
static bool RunApploader(bool is_wii, const DiscIO::IVolume& volume);
|
||||
static bool EmulatedBS2_GC(const DiscIO::IVolume* volume, bool skip_app_loader = false);
|
||||
static bool EmulatedBS2_Wii(const DiscIO::IVolume* volume);
|
||||
static bool EmulatedBS2(bool is_wii, const DiscIO::IVolume* volume);
|
||||
static bool RunApploader(bool is_wii, const DiscIO::Volume& volume);
|
||||
static bool EmulatedBS2_GC(const DiscIO::Volume* volume, bool skip_app_loader = false);
|
||||
static bool EmulatedBS2_Wii(const DiscIO::Volume* volume);
|
||||
static bool EmulatedBS2(bool is_wii, const DiscIO::Volume* volume);
|
||||
static bool Load_BS2(const std::string& boot_rom_filename);
|
||||
static void Load_FST(bool is_wii, const DiscIO::IVolume* volume);
|
||||
static void Load_FST(bool is_wii, const DiscIO::Volume* volume);
|
||||
|
||||
static bool SetupWiiMemory(const DiscIO::IVolume* volume, u64 ios_title_id);
|
||||
static bool SetupWiiMemory(const DiscIO::Volume* volume, u64 ios_title_id);
|
||||
};
|
||||
|
||||
@@ -82,7 +82,7 @@ void CBoot::SetupBAT(bool is_wii)
|
||||
PowerPC::IBATUpdated();
|
||||
}
|
||||
|
||||
bool CBoot::RunApploader(bool is_wii, const DiscIO::IVolume& volume)
|
||||
bool CBoot::RunApploader(bool is_wii, const DiscIO::Volume& volume)
|
||||
{
|
||||
const DiscIO::Partition partition = volume.GetGamePartition();
|
||||
|
||||
@@ -155,7 +155,7 @@ bool CBoot::RunApploader(bool is_wii, const DiscIO::IVolume& volume)
|
||||
// GameCube Bootstrap 2 HLE:
|
||||
// copy the apploader to 0x81200000
|
||||
// execute the apploader, function by function, using the above utility.
|
||||
bool CBoot::EmulatedBS2_GC(const DiscIO::IVolume* volume, bool skip_app_loader)
|
||||
bool CBoot::EmulatedBS2_GC(const DiscIO::Volume* volume, bool skip_app_loader)
|
||||
{
|
||||
INFO_LOG(BOOT, "Faking GC BS2...");
|
||||
|
||||
@@ -217,7 +217,7 @@ bool CBoot::EmulatedBS2_GC(const DiscIO::IVolume* volume, bool skip_app_loader)
|
||||
return RunApploader(/*is_wii*/ false, *volume);
|
||||
}
|
||||
|
||||
bool CBoot::SetupWiiMemory(const DiscIO::IVolume* volume, u64 ios_title_id)
|
||||
bool CBoot::SetupWiiMemory(const DiscIO::Volume* volume, u64 ios_title_id)
|
||||
{
|
||||
static const std::map<DiscIO::Region, const RegionSetting> region_settings = {
|
||||
{DiscIO::Region::NTSC_J, {"JPN", "NTSC", "JP", "LJ"}},
|
||||
@@ -331,7 +331,7 @@ bool CBoot::SetupWiiMemory(const DiscIO::IVolume* volume, u64 ios_title_id)
|
||||
// Wii Bootstrap 2 HLE:
|
||||
// copy the apploader to 0x81200000
|
||||
// execute the apploader
|
||||
bool CBoot::EmulatedBS2_Wii(const DiscIO::IVolume* volume)
|
||||
bool CBoot::EmulatedBS2_Wii(const DiscIO::Volume* volume)
|
||||
{
|
||||
INFO_LOG(BOOT, "Faking Wii BS2...");
|
||||
if (!volume)
|
||||
@@ -374,7 +374,7 @@ bool CBoot::EmulatedBS2_Wii(const DiscIO::IVolume* volume)
|
||||
// Returns true if apploader has run successfully.
|
||||
// If is_wii is true and volume is not nullptr, the disc that volume
|
||||
// point to must currently be inserted into the emulated disc drive.
|
||||
bool CBoot::EmulatedBS2(bool is_wii, const DiscIO::IVolume* volume)
|
||||
bool CBoot::EmulatedBS2(bool is_wii, const DiscIO::Volume* volume)
|
||||
{
|
||||
return is_wii ? EmulatedBS2_Wii(volume) : EmulatedBS2_GC(volume);
|
||||
}
|
||||
|
||||
@@ -72,8 +72,8 @@ bool CBoot::Boot_WiiWAD(const std::string& _pFilename)
|
||||
state_file.WriteBytes(&state, sizeof(StateFlags));
|
||||
}
|
||||
|
||||
const DiscIO::CNANDContentLoader& ContentLoader =
|
||||
DiscIO::CNANDContentManager::Access().GetNANDLoader(_pFilename);
|
||||
const DiscIO::NANDContentLoader& ContentLoader =
|
||||
DiscIO::NANDContentManager::Access().GetNANDLoader(_pFilename);
|
||||
if (!ContentLoader.IsValid())
|
||||
return false;
|
||||
|
||||
|
||||
@@ -721,7 +721,7 @@ void SConfig::ResetRunningGameMetadata()
|
||||
SetRunningGameMetadata("00000000", 0, 0, Core::TitleDatabase::TitleType::Other);
|
||||
}
|
||||
|
||||
void SConfig::SetRunningGameMetadata(const DiscIO::IVolume& volume,
|
||||
void SConfig::SetRunningGameMetadata(const DiscIO::Volume& volume,
|
||||
const DiscIO::Partition& partition)
|
||||
{
|
||||
SetRunningGameMetadata(volume.GetGameID(partition), volume.GetTitleID(partition).value_or(0),
|
||||
@@ -917,7 +917,7 @@ bool SConfig::AutoSetup(EBootBS2 _BootBS2)
|
||||
bootDrive)
|
||||
{
|
||||
m_BootType = BOOT_ISO;
|
||||
std::unique_ptr<DiscIO::IVolume> pVolume(DiscIO::CreateVolumeFromFilename(m_strFilename));
|
||||
std::unique_ptr<DiscIO::Volume> pVolume(DiscIO::CreateVolumeFromFilename(m_strFilename));
|
||||
if (pVolume == nullptr)
|
||||
{
|
||||
if (bootDrive)
|
||||
@@ -973,10 +973,10 @@ bool SConfig::AutoSetup(EBootBS2 _BootBS2)
|
||||
bWii = ddfFile->GetIsWii();
|
||||
}
|
||||
}
|
||||
else if (DiscIO::CNANDContentManager::Access().GetNANDLoader(m_strFilename).IsValid())
|
||||
else if (DiscIO::NANDContentManager::Access().GetNANDLoader(m_strFilename).IsValid())
|
||||
{
|
||||
const DiscIO::CNANDContentLoader& content_loader =
|
||||
DiscIO::CNANDContentManager::Access().GetNANDLoader(m_strFilename);
|
||||
const DiscIO::NANDContentLoader& content_loader =
|
||||
DiscIO::NANDContentManager::Access().GetNANDLoader(m_strFilename);
|
||||
const IOS::ES::TMDReader& tmd = content_loader.GetTMD();
|
||||
|
||||
if (!IOS::ES::IsChannel(tmd.GetTitleId()))
|
||||
|
||||
@@ -22,7 +22,7 @@ namespace DiscIO
|
||||
enum class Language;
|
||||
enum class Region;
|
||||
struct Partition;
|
||||
class IVolume;
|
||||
class Volume;
|
||||
}
|
||||
namespace IOS
|
||||
{
|
||||
@@ -225,7 +225,7 @@ struct SConfig : NonCopyable
|
||||
u64 GetTitleID() const { return m_title_id; }
|
||||
u16 GetRevision() const { return m_revision; }
|
||||
void ResetRunningGameMetadata();
|
||||
void SetRunningGameMetadata(const DiscIO::IVolume& volume, const DiscIO::Partition& partition);
|
||||
void SetRunningGameMetadata(const DiscIO::Volume& volume, const DiscIO::Partition& partition);
|
||||
void SetRunningGameMetadata(const IOS::ES::TMDReader& tmd);
|
||||
|
||||
void LoadDefaults();
|
||||
|
||||
@@ -33,7 +33,7 @@
|
||||
|
||||
#include "DiscIO/Enums.h"
|
||||
#include "DiscIO/Volume.h"
|
||||
#include "DiscIO/VolumeWiiCrypted.h"
|
||||
#include "DiscIO/VolumeWii.h"
|
||||
|
||||
// The minimum time it takes for the DVD drive to process a command (in
|
||||
// microseconds)
|
||||
@@ -435,7 +435,7 @@ void Shutdown()
|
||||
DVDThread::Stop();
|
||||
}
|
||||
|
||||
void SetDisc(std::unique_ptr<DiscIO::IVolume> disc)
|
||||
void SetDisc(std::unique_ptr<DiscIO::Volume> disc)
|
||||
{
|
||||
if (disc)
|
||||
s_current_partition = disc->GetGamePartition();
|
||||
@@ -460,7 +460,7 @@ static void EjectDiscCallback(u64 userdata, s64 cyclesLate)
|
||||
|
||||
static void InsertDiscCallback(u64 userdata, s64 cyclesLate)
|
||||
{
|
||||
std::unique_ptr<DiscIO::IVolume> new_volume =
|
||||
std::unique_ptr<DiscIO::Volume> new_volume =
|
||||
DiscIO::CreateVolumeFromFilename(s_disc_path_to_insert);
|
||||
|
||||
if (new_volume)
|
||||
@@ -1147,7 +1147,7 @@ void ScheduleReads(u64 offset, u32 length, const DiscIO::Partition& partition, u
|
||||
// The variable dvd_offset tracks the actual offset on the DVD
|
||||
// that the disc drive starts reading at, which differs in two ways:
|
||||
// It's rounded to a whole ECC block and never uses Wii partition addressing.
|
||||
u64 dvd_offset = DiscIO::CVolumeWiiCrypted::PartitionOffsetToRawOffset(offset, partition);
|
||||
u64 dvd_offset = DiscIO::VolumeWii::PartitionOffsetToRawOffset(offset, partition);
|
||||
dvd_offset = Common::AlignDown(dvd_offset, DVD_ECC_BLOCK_SIZE);
|
||||
|
||||
if (SConfig::GetInstance().bFastDiscSpeed)
|
||||
@@ -1215,7 +1215,7 @@ void ScheduleReads(u64 offset, u32 length, const DiscIO::Partition& partition, u
|
||||
|
||||
const u32 bytes_per_chunk = partition == DiscIO::PARTITION_NONE ?
|
||||
DVD_ECC_BLOCK_SIZE :
|
||||
DiscIO::CVolumeWiiCrypted::BLOCK_DATA_SIZE;
|
||||
DiscIO::VolumeWii::BLOCK_DATA_SIZE;
|
||||
|
||||
while (length > 0)
|
||||
{
|
||||
|
||||
@@ -13,7 +13,7 @@
|
||||
class PointerWrap;
|
||||
namespace DiscIO
|
||||
{
|
||||
class IVolume;
|
||||
class Volume;
|
||||
struct Partition;
|
||||
}
|
||||
namespace MMIO
|
||||
@@ -110,12 +110,12 @@ void DoState(PointerWrap& p);
|
||||
|
||||
void RegisterMMIO(MMIO::Mapping* mmio, u32 base);
|
||||
|
||||
void SetDisc(std::unique_ptr<DiscIO::IVolume> disc);
|
||||
void SetDisc(std::unique_ptr<DiscIO::Volume> disc);
|
||||
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
|
||||
|
||||
// This function returns true and calls SConfig::SetRunningGameMetadata(IVolume&, Partition&)
|
||||
// This function returns true and calls SConfig::SetRunningGameMetadata(Volume&, Partition&)
|
||||
// if both of the following conditions are true:
|
||||
// - A disc is inserted
|
||||
// - The title_id argument doesn't contain a value, or its value matches the disc's title ID
|
||||
|
||||
@@ -86,7 +86,7 @@ static Common::FifoQueue<ReadRequest, false> s_request_queue;
|
||||
static Common::FifoQueue<ReadResult, false> s_result_queue;
|
||||
static std::map<u64, ReadResult> s_result_map;
|
||||
|
||||
static std::unique_ptr<DiscIO::IVolume> s_disc;
|
||||
static std::unique_ptr<DiscIO::Volume> s_disc;
|
||||
|
||||
void Start()
|
||||
{
|
||||
@@ -180,7 +180,7 @@ void DoState(PointerWrap& p)
|
||||
// was made. Handling that properly may be more effort than it's worth.
|
||||
}
|
||||
|
||||
void SetDisc(std::unique_ptr<DiscIO::IVolume> disc)
|
||||
void SetDisc(std::unique_ptr<DiscIO::Volume> disc)
|
||||
{
|
||||
WaitUntilIdle();
|
||||
s_disc = std::move(disc);
|
||||
|
||||
@@ -22,7 +22,7 @@ enum class ReplyType : u32;
|
||||
namespace DiscIO
|
||||
{
|
||||
enum class Platform;
|
||||
class IVolume;
|
||||
class Volume;
|
||||
}
|
||||
namespace IOS
|
||||
{
|
||||
@@ -39,13 +39,13 @@ void Start();
|
||||
void Stop();
|
||||
void DoState(PointerWrap& p);
|
||||
|
||||
void SetDisc(std::unique_ptr<DiscIO::IVolume> disc);
|
||||
void SetDisc(std::unique_ptr<DiscIO::Volume> disc);
|
||||
bool HasDisc();
|
||||
|
||||
DiscIO::Platform GetDiscType();
|
||||
IOS::ES::TMDReader GetTMD(const DiscIO::Partition& partition);
|
||||
IOS::ES::TicketReader GetTicket(const DiscIO::Partition& partition);
|
||||
// This function returns true and calls SConfig::SetRunningGameMetadata(IVolume&, Partition&)
|
||||
// This function returns true and calls SConfig::SetRunningGameMetadata(Volume&, Partition&)
|
||||
// if both of the following conditions are true:
|
||||
// - A disc is inserted
|
||||
// - The title_id argument doesn't contain a value, or its value matches the disc's title ID
|
||||
|
||||
@@ -21,9 +21,9 @@
|
||||
|
||||
namespace FileMonitor
|
||||
{
|
||||
static const DiscIO::IVolume* s_volume;
|
||||
static const DiscIO::Volume* s_volume;
|
||||
static bool s_new_volume = false;
|
||||
static std::unique_ptr<DiscIO::IFileSystem> s_filesystem;
|
||||
static std::unique_ptr<DiscIO::FileSystem> s_filesystem;
|
||||
static DiscIO::Partition s_partition;
|
||||
static std::string s_previous_file;
|
||||
|
||||
@@ -53,7 +53,7 @@ static bool IsSoundFile(const std::string& filename)
|
||||
return extensions.find(extension) != extensions.end();
|
||||
}
|
||||
|
||||
void SetFileSystem(const DiscIO::IVolume* volume)
|
||||
void SetFileSystem(const DiscIO::Volume* volume)
|
||||
{
|
||||
// Instead of creating the file system object right away, we will let Log
|
||||
// create it later once we know that it actually will get used
|
||||
|
||||
@@ -9,14 +9,14 @@
|
||||
namespace DiscIO
|
||||
{
|
||||
struct Partition;
|
||||
class IVolume;
|
||||
class Volume;
|
||||
}
|
||||
|
||||
namespace FileMonitor
|
||||
{
|
||||
// Can be called with nullptr to set the file system to nothing. When not called
|
||||
// with nullptr, the volume must remain valid until the next SetFileSystem call.
|
||||
void SetFileSystem(const DiscIO::IVolume* volume);
|
||||
void SetFileSystem(const DiscIO::Volume* volume);
|
||||
// Logs access to files in the file system set by SetFileSystem
|
||||
void Log(u64 offset, const DiscIO::Partition& partition);
|
||||
}
|
||||
|
||||
@@ -89,7 +89,7 @@ void TitleContext::DoState(PointerWrap& p)
|
||||
p.Do(active);
|
||||
}
|
||||
|
||||
void TitleContext::Update(const DiscIO::CNANDContentLoader& content_loader)
|
||||
void TitleContext::Update(const DiscIO::NANDContentLoader& content_loader)
|
||||
{
|
||||
if (!content_loader.IsValid())
|
||||
return;
|
||||
@@ -121,7 +121,7 @@ void ES::LoadWAD(const std::string& _rContentFile)
|
||||
s_content_file = _rContentFile;
|
||||
// XXX: Ideally, this should be done during a launch, but because we support launching WADs
|
||||
// without installing them (which is a bit of a hack), we have to do this manually here.
|
||||
const auto& content_loader = DiscIO::CNANDContentManager::Access().GetNANDLoader(s_content_file);
|
||||
const auto& content_loader = DiscIO::NANDContentManager::Access().GetNANDLoader(s_content_file);
|
||||
s_title_context.Update(content_loader);
|
||||
INFO_LOG(IOS_ES, "LoadWAD: Title context changed: %016" PRIx64, s_title_context.tmd.GetTitleId());
|
||||
}
|
||||
@@ -216,7 +216,7 @@ bool ES::LaunchTitle(u64 title_id, bool skip_reload)
|
||||
// ES_Launch should probably reset the whole state, which at least means closing all open files.
|
||||
// leaving them open through ES_Launch may cause hangs and other funky behavior
|
||||
// (supposedly when trying to re-open those files).
|
||||
DiscIO::CNANDContentManager::Access().ClearCache();
|
||||
DiscIO::NANDContentManager::Access().ClearCache();
|
||||
|
||||
if (IsTitleType(title_id, IOS::ES::TitleType::System) && title_id != TITLEID_SYSMENU)
|
||||
return LaunchIOS(title_id);
|
||||
@@ -230,7 +230,7 @@ bool ES::LaunchIOS(u64 ios_title_id)
|
||||
|
||||
bool ES::LaunchPPCTitle(u64 title_id, bool skip_reload)
|
||||
{
|
||||
const DiscIO::CNANDContentLoader& content_loader = AccessContentDevice(title_id);
|
||||
const DiscIO::NANDContentLoader& content_loader = AccessContentDevice(title_id);
|
||||
if (!content_loader.IsValid())
|
||||
{
|
||||
if (title_id == 0x0000000100000002)
|
||||
@@ -369,7 +369,7 @@ ReturnCode ES::Close(u32 fd)
|
||||
INFO_LOG(IOS_ES, "ES: Close");
|
||||
m_is_active = false;
|
||||
// clear the NAND content cache to make sure nothing remains open.
|
||||
DiscIO::CNANDContentManager::Access().ClearCache();
|
||||
DiscIO::NANDContentManager::Access().ClearCache();
|
||||
return IPC_SUCCESS;
|
||||
}
|
||||
|
||||
@@ -585,7 +585,7 @@ IPCCommandResult ES::LaunchBC(const IOCtlVRequest& request)
|
||||
return GetNoReply();
|
||||
}
|
||||
|
||||
const DiscIO::CNANDContentLoader& ES::AccessContentDevice(u64 title_id)
|
||||
const DiscIO::NANDContentLoader& ES::AccessContentDevice(u64 title_id)
|
||||
{
|
||||
// for WADs, the passed title id and the stored title id match; along with s_content_file
|
||||
// being set to the actual WAD file name. We cannot simply get a NAND Loader for the title id
|
||||
@@ -594,10 +594,10 @@ const DiscIO::CNANDContentLoader& ES::AccessContentDevice(u64 title_id)
|
||||
if (s_title_context.active && s_title_context.tmd.GetTitleId() == title_id &&
|
||||
!s_content_file.empty())
|
||||
{
|
||||
return DiscIO::CNANDContentManager::Access().GetNANDLoader(s_content_file);
|
||||
return DiscIO::NANDContentManager::Access().GetNANDLoader(s_content_file);
|
||||
}
|
||||
|
||||
return DiscIO::CNANDContentManager::Access().GetNANDLoader(title_id, Common::FROM_SESSION_ROOT);
|
||||
return DiscIO::NANDContentManager::Access().GetNANDLoader(title_id, Common::FROM_SESSION_ROOT);
|
||||
}
|
||||
|
||||
// This is technically an ioctlv in IOS's ES, but it is an internal API which cannot be
|
||||
@@ -636,7 +636,7 @@ s32 ES::DIVerify(const IOS::ES::TMDReader& tmd, const IOS::ES::TicketReader& tic
|
||||
}
|
||||
// DI_VERIFY writes to title.tmd, which is read and cached inside the NAND Content Manager.
|
||||
// clear the cache to avoid content access mismatches.
|
||||
DiscIO::CNANDContentManager::Access().ClearCache();
|
||||
DiscIO::NANDContentManager::Access().ClearCache();
|
||||
|
||||
if (!UpdateUIDAndGID(*GetIOS(), s_title_context.tmd))
|
||||
{
|
||||
|
||||
@@ -18,7 +18,7 @@ class PointerWrap;
|
||||
|
||||
namespace DiscIO
|
||||
{
|
||||
class CNANDContentLoader;
|
||||
class NANDContentLoader;
|
||||
}
|
||||
|
||||
namespace IOS
|
||||
@@ -31,7 +31,7 @@ struct TitleContext
|
||||
{
|
||||
void Clear();
|
||||
void DoState(PointerWrap& p);
|
||||
void Update(const DiscIO::CNANDContentLoader& content_loader);
|
||||
void Update(const DiscIO::NANDContentLoader& content_loader);
|
||||
void Update(const IOS::ES::TMDReader& tmd_, const IOS::ES::TicketReader& ticket_);
|
||||
|
||||
IOS::ES::TicketReader ticket;
|
||||
@@ -284,7 +284,7 @@ private:
|
||||
bool LaunchPPCTitle(u64 title_id, bool skip_reload);
|
||||
static TitleContext& GetTitleContext();
|
||||
|
||||
static const DiscIO::CNANDContentLoader& AccessContentDevice(u64 title_id);
|
||||
static const DiscIO::NANDContentLoader& AccessContentDevice(u64 title_id);
|
||||
|
||||
u32 OpenTitleContent(u32 CFD, u64 TitleID, u16 Index);
|
||||
|
||||
|
||||
@@ -22,7 +22,7 @@ namespace Device
|
||||
{
|
||||
u32 ES::OpenTitleContent(u32 CFD, u64 TitleID, u16 Index)
|
||||
{
|
||||
const DiscIO::CNANDContentLoader& Loader = AccessContentDevice(TitleID);
|
||||
const DiscIO::NANDContentLoader& Loader = AccessContentDevice(TitleID);
|
||||
|
||||
if (!Loader.IsValid() || !Loader.GetTMD().IsValid() || !Loader.GetTicket().IsValid())
|
||||
{
|
||||
@@ -30,7 +30,7 @@ u32 ES::OpenTitleContent(u32 CFD, u64 TitleID, u16 Index)
|
||||
return 0xffffffff;
|
||||
}
|
||||
|
||||
const DiscIO::SNANDContent* pContent = Loader.GetContentByIndex(Index);
|
||||
const DiscIO::NANDContent* pContent = Loader.GetContentByIndex(Index);
|
||||
|
||||
if (pContent == nullptr)
|
||||
{
|
||||
@@ -106,11 +106,11 @@ IPCCommandResult ES::ReadContent(u32 uid, const IOCtlVRequest& request)
|
||||
{
|
||||
if (pDest)
|
||||
{
|
||||
const DiscIO::CNANDContentLoader& ContentLoader = AccessContentDevice(rContent.m_title_id);
|
||||
const DiscIO::NANDContentLoader& ContentLoader = AccessContentDevice(rContent.m_title_id);
|
||||
// ContentLoader should never be invalid; rContent has been created by it.
|
||||
if (ContentLoader.IsValid() && ContentLoader.GetTicket().IsValid())
|
||||
{
|
||||
const DiscIO::SNANDContent* pContent =
|
||||
const DiscIO::NANDContent* pContent =
|
||||
ContentLoader.GetContentByIndex(rContent.m_content.index);
|
||||
if (!pContent->m_Data->GetRange(rContent.m_position, Size, pDest))
|
||||
ERROR_LOG(IOS_ES, "ES: failed to read %u bytes from %u!", Size, rContent.m_position);
|
||||
@@ -146,11 +146,11 @@ IPCCommandResult ES::CloseContent(u32 uid, const IOCtlVRequest& request)
|
||||
return GetDefaultReply(-1);
|
||||
}
|
||||
|
||||
const DiscIO::CNANDContentLoader& ContentLoader = AccessContentDevice(itr->second.m_title_id);
|
||||
const DiscIO::NANDContentLoader& ContentLoader = AccessContentDevice(itr->second.m_title_id);
|
||||
// ContentLoader should never be invalid; we shouldn't be here if ES_OPENCONTENT failed before.
|
||||
if (ContentLoader.IsValid())
|
||||
{
|
||||
const DiscIO::SNANDContent* pContent =
|
||||
const DiscIO::NANDContent* pContent =
|
||||
ContentLoader.GetContentByIndex(itr->second.m_content.index);
|
||||
pContent->m_Data->Close();
|
||||
}
|
||||
|
||||
@@ -375,8 +375,8 @@ ReturnCode ES::DeleteTitle(u64 title_id)
|
||||
ERROR_LOG(IOS_ES, "DeleteTitle: Failed to delete title directory: %s", title_dir.c_str());
|
||||
return FS_EACCESS;
|
||||
}
|
||||
// XXX: ugly, but until we drop CNANDContentManager everywhere, this is going to be needed.
|
||||
DiscIO::CNANDContentManager::Access().ClearCache();
|
||||
// XXX: ugly, but until we drop NANDContentManager everywhere, this is going to be needed.
|
||||
DiscIO::NANDContentManager::Access().ClearCache();
|
||||
|
||||
return IPC_SUCCESS;
|
||||
}
|
||||
|
||||
@@ -273,7 +273,7 @@ u16 Kernel::GetGidForPPC() const
|
||||
|
||||
// This corresponds to syscall 0x41, which loads a binary from the NAND and bootstraps the PPC.
|
||||
// Unlike 0x42, IOS will set up some constants in memory before booting the PPC.
|
||||
bool Kernel::BootstrapPPC(const DiscIO::CNANDContentLoader& content_loader)
|
||||
bool Kernel::BootstrapPPC(const DiscIO::NANDContentLoader& content_loader)
|
||||
{
|
||||
if (!content_loader.IsValid())
|
||||
return false;
|
||||
|
||||
@@ -21,7 +21,7 @@ class PointerWrap;
|
||||
|
||||
namespace DiscIO
|
||||
{
|
||||
class CNANDContentLoader;
|
||||
class NANDContentLoader;
|
||||
}
|
||||
|
||||
namespace IOS
|
||||
@@ -111,7 +111,7 @@ public:
|
||||
void SetGidForPPC(u16 gid);
|
||||
u16 GetGidForPPC() const;
|
||||
|
||||
bool BootstrapPPC(const DiscIO::CNANDContentLoader& content_loader);
|
||||
bool BootstrapPPC(const DiscIO::NANDContentLoader& content_loader);
|
||||
bool BootIOS(u64 ios_title_id);
|
||||
u32 GetVersion() const;
|
||||
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user