DiscIO: Replace "raw" functions with "decrypt" parameters
This is intended to make decryption look less implicit in the code.
This commit is contained in:
1 parent
72f8f243c7
commit
bb93336ecf
19 files changed
+173
-194
No files matched your search
@@ -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;
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user