mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-06-28 09:59:32 -06:00
DiscIO: Make functions constant
This commit is contained in:
@ -307,7 +307,7 @@ private:
|
|||||||
void SetPartitions(std::vector<PartitionWithType>&& partitions);
|
void SetPartitions(std::vector<PartitionWithType>&& partitions);
|
||||||
void SetPartitionHeader(DirectoryBlobPartition* partition, u64 partition_address);
|
void SetPartitionHeader(DirectoryBlobPartition* partition, u64 partition_address);
|
||||||
|
|
||||||
VolumeDisc* GetWrappedVolume() { return m_wrapped_volume.get(); }
|
const VolumeDisc* GetWrappedVolume() const { return m_wrapped_volume.get(); }
|
||||||
|
|
||||||
// For GameCube:
|
// For GameCube:
|
||||||
DirectoryBlobPartition m_gamecube_pseudopartition;
|
DirectoryBlobPartition m_gamecube_pseudopartition;
|
||||||
|
@ -168,7 +168,7 @@ void NANDImporter::ProcessEntry(u16 entry_number, const std::string& parent_path
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
std::vector<u8> NANDImporter::GetEntryData(const NANDFSTEntry& entry)
|
std::vector<u8> NANDImporter::GetEntryData(const NANDFSTEntry& entry) const
|
||||||
{
|
{
|
||||||
constexpr size_t NAND_FAT_BLOCK_SIZE = 0x4000;
|
constexpr size_t NAND_FAT_BLOCK_SIZE = 0x4000;
|
||||||
|
|
||||||
|
@ -70,7 +70,7 @@ private:
|
|||||||
std::string GetPath(const NANDFSTEntry& entry, const std::string& parent_path);
|
std::string GetPath(const NANDFSTEntry& entry, const std::string& parent_path);
|
||||||
std::string FormatDebugString(const NANDFSTEntry& entry);
|
std::string FormatDebugString(const NANDFSTEntry& entry);
|
||||||
void ProcessEntry(u16 entry_number, const std::string& parent_path);
|
void ProcessEntry(u16 entry_number, const std::string& parent_path);
|
||||||
std::vector<u8> GetEntryData(const NANDFSTEntry& entry);
|
std::vector<u8> GetEntryData(const NANDFSTEntry& entry) const;
|
||||||
void ExportKeys();
|
void ExportKeys();
|
||||||
|
|
||||||
std::string m_nand_root;
|
std::string m_nand_root;
|
||||||
|
@ -184,7 +184,7 @@ u64 NFSFileReader::GetRawSize() const
|
|||||||
return m_raw_size;
|
return m_raw_size;
|
||||||
}
|
}
|
||||||
|
|
||||||
u64 NFSFileReader::ToPhysicalBlockIndex(u64 logical_block_index)
|
u64 NFSFileReader::ToPhysicalBlockIndex(u64 logical_block_index) const
|
||||||
{
|
{
|
||||||
u64 physical_blocks_so_far = 0;
|
u64 physical_blocks_so_far = 0;
|
||||||
|
|
||||||
|
@ -73,7 +73,7 @@ private:
|
|||||||
NFSFileReader(std::vector<NFSLBARange> lba_ranges, std::vector<File::IOFile> files, Key key,
|
NFSFileReader(std::vector<NFSLBARange> lba_ranges, std::vector<File::IOFile> files, Key key,
|
||||||
u64 raw_size);
|
u64 raw_size);
|
||||||
|
|
||||||
u64 ToPhysicalBlockIndex(u64 logical_block_index);
|
u64 ToPhysicalBlockIndex(u64 logical_block_index) const;
|
||||||
bool ReadEncryptedBlock(u64 physical_block_index);
|
bool ReadEncryptedBlock(u64 physical_block_index);
|
||||||
void DecryptBlock(u64 logical_block_index);
|
void DecryptBlock(u64 logical_block_index);
|
||||||
bool ReadAndDecryptBlock(u64 logical_block_index);
|
bool ReadAndDecryptBlock(u64 logical_block_index);
|
||||||
|
@ -57,7 +57,7 @@ FileDataLoaderHostFS::FileDataLoaderHostFS(std::string sd_root, const std::strin
|
|||||||
}
|
}
|
||||||
|
|
||||||
std::optional<std::string>
|
std::optional<std::string>
|
||||||
FileDataLoaderHostFS::MakeAbsoluteFromRelative(std::string_view external_relative_path)
|
FileDataLoaderHostFS::MakeAbsoluteFromRelative(std::string_view external_relative_path) const
|
||||||
{
|
{
|
||||||
#ifdef _WIN32
|
#ifdef _WIN32
|
||||||
// Riivolution treats a backslash as just a standard filename character, but we can't replicate
|
// Riivolution treats a backslash as just a standard filename character, but we can't replicate
|
||||||
|
@ -65,7 +65,8 @@ public:
|
|||||||
ResolveSavegameRedirectPath(std::string_view external_relative_path) override;
|
ResolveSavegameRedirectPath(std::string_view external_relative_path) override;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
std::optional<std::string> MakeAbsoluteFromRelative(std::string_view external_relative_path);
|
std::optional<std::string>
|
||||||
|
MakeAbsoluteFromRelative(std::string_view external_relative_path) const;
|
||||||
|
|
||||||
std::string m_sd_root;
|
std::string m_sd_root;
|
||||||
std::string m_patch_root;
|
std::string m_patch_root;
|
||||||
|
@ -44,7 +44,7 @@ private:
|
|||||||
bool ReadHeader();
|
bool ReadHeader();
|
||||||
|
|
||||||
File::IOFile& SeekToCluster(u64 offset, u64* available);
|
File::IOFile& SeekToCluster(u64 offset, u64* available);
|
||||||
bool IsGood() { return m_good; }
|
bool IsGood() const { return m_good; }
|
||||||
struct FileEntry
|
struct FileEntry
|
||||||
{
|
{
|
||||||
FileEntry(File::IOFile file_, u64 base_address_, u64 size_)
|
FileEntry(File::IOFile file_, u64 base_address_, u64 size_)
|
||||||
|
Reference in New Issue
Block a user