diff options
| author | Lioncash <mathew1800@gmail.com> | 2015-03-05 12:18:53 -0500 |
|---|---|---|
| committer | Lioncash <mathew1800@gmail.com> | 2015-03-05 12:18:53 -0500 |
| commit | b7514955e51ed2cbbcd83417817d0c87d03e7651 (patch) | |
| tree | 9d43b7c2fcd5f7b7d0e2609ad436a9a10c66e75f /Source/Core/DiscIO/VolumeWiiCrypted.cpp | |
| parent | da56582ba017284fadda90d3091dc40f1784402a (diff) | |
| parent | 492aa5c3915f38be7ea90f5dddd99f3244cf8914 (diff) | |
Merge pull request #2113 from Stevoisiak/VolumeCleanup
Basic volume code cleanup
Diffstat (limited to 'Source/Core/DiscIO/VolumeWiiCrypted.cpp')
| -rw-r--r-- | Source/Core/DiscIO/VolumeWiiCrypted.cpp | 16 |
1 files changed, 12 insertions, 4 deletions
diff --git a/Source/Core/DiscIO/VolumeWiiCrypted.cpp b/Source/Core/DiscIO/VolumeWiiCrypted.cpp index dad2977ba0..4c703fdb3f 100644 --- a/Source/Core/DiscIO/VolumeWiiCrypted.cpp +++ b/Source/Core/DiscIO/VolumeWiiCrypted.cpp @@ -95,7 +95,7 @@ bool CVolumeWiiCrypted::Read(u64 _ReadOffset, u64 _Length, u8* _pBuffer, bool de memcpy(_pBuffer, &m_LastDecryptedBlock[Offset], (size_t)CopySize); // Update offsets - _Length -= CopySize; + _Length -= CopySize; _pBuffer += CopySize; _ReadOffset += CopySize; } @@ -158,10 +158,10 @@ IVolume::ECountry CVolumeWiiCrypted::GetCountry() const if (!m_pReader) return COUNTRY_UNKNOWN; - u8 CountryCode; - m_pReader->Read(3, 1, &CountryCode); + u8 country_code; + m_pReader->Read(3, 1, &country_code); - return CountrySwitch(CountryCode); + return CountrySwitch(country_code); } std::string CVolumeWiiCrypted::GetMakerID() const @@ -237,6 +237,14 @@ bool CVolumeWiiCrypted::IsWiiDisc() const return true; } +bool CVolumeWiiCrypted::IsDiscTwo() const +{ + u8 disc_two_check; + m_pReader->Read(6, 1, &disc_two_check); + return (disc_two_check == 1); +} + + u64 CVolumeWiiCrypted::GetSize() const { if (m_pReader) |
