mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-08-07 00:28:56 +00:00
DiscIO: Replace "raw" functions with "decrypt" parameters
This is intended to make decryption look less implicit in the code.
This commit is contained in:
parent
72f8f243c7
commit
bb93336ecf
19 changed files with 174 additions and 195 deletions
|
@ -53,29 +53,21 @@ void SetVolumeDirectory(const std::string& _rFullPath, bool _bIsWii, const std::
|
|||
g_pVolume = DiscIO::CreateVolumeFromDirectory(_rFullPath, _bIsWii, _rApploader, _rDOL);
|
||||
}
|
||||
|
||||
u32 Read32(u64 _Offset)
|
||||
u32 Read32(u64 _Offset, bool decrypt)
|
||||
{
|
||||
if (g_pVolume != nullptr)
|
||||
{
|
||||
u32 Temp;
|
||||
g_pVolume->Read(_Offset, 4, (u8*)&Temp);
|
||||
g_pVolume->Read(_Offset, 4, (u8*)&Temp, decrypt);
|
||||
return Common::swap32(Temp);
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
bool ReadToPtr(u8* ptr, u64 _dwOffset, u64 _dwLength)
|
||||
bool ReadToPtr(u8* ptr, u64 _dwOffset, u64 _dwLength, bool decrypt)
|
||||
{
|
||||
if (g_pVolume != nullptr && ptr)
|
||||
return g_pVolume->Read(_dwOffset, _dwLength, ptr);
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
bool RAWReadToPtr(u8* ptr, u64 _dwOffset, u64 _dwLength)
|
||||
{
|
||||
if (g_pVolume != nullptr && ptr)
|
||||
return g_pVolume->RAWRead(_dwOffset, _dwLength, ptr);
|
||||
return g_pVolume->Read(_dwOffset, _dwLength, ptr, decrypt);
|
||||
|
||||
return false;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue