diff options
| author | Linktothepast <kostamarino@gmail.com> | 2015-09-28 16:50:35 +0300 |
|---|---|---|
| committer | Linktothepast <kostamarino@gmail.com> | 2015-09-28 16:50:35 +0300 |
| commit | 748be565b8df535ef558e74b38cd0f4d615f8a21 (patch) | |
| tree | b151efee0a87e99125f2401325a9bddecf84fc73 /Source/Core/DiscIO/VolumeGC.cpp | |
| parent | cf17fccdd3093a1b8476b10183b1c4bde36da74d (diff) | |
| parent | ce493b897d6d3735c930a8465cc0c26bbe5feb86 (diff) | |
Merge remote-tracking branch 'dolphin-emu/master' into gameinis
Diffstat (limited to 'Source/Core/DiscIO/VolumeGC.cpp')
| -rw-r--r-- | Source/Core/DiscIO/VolumeGC.cpp | 19 |
1 files changed, 13 insertions, 6 deletions
diff --git a/Source/Core/DiscIO/VolumeGC.cpp b/Source/Core/DiscIO/VolumeGC.cpp index f2e54bdde8..d1a34a5e0e 100644 --- a/Source/Core/DiscIO/VolumeGC.cpp +++ b/Source/Core/DiscIO/VolumeGC.cpp @@ -6,10 +6,12 @@ #include <map> #include <memory> #include <string> +#include <utility> #include <vector> #include "Common/ColorUtil.h" #include "Common/CommonTypes.h" +#include "Common/MsgHandler.h" #include "Common/StringUtil.h" #include "Common/Logging/Log.h" #include "DiscIO/Blob.h" @@ -20,8 +22,8 @@ namespace DiscIO { -CVolumeGC::CVolumeGC(IBlobReader* _pReader) - : m_pReader(_pReader) +CVolumeGC::CVolumeGC(std::unique_ptr<IBlobReader> reader) + : m_pReader(std::move(reader)) {} CVolumeGC::~CVolumeGC() @@ -143,7 +145,7 @@ std::vector<u32> CVolumeGC::GetBanner(int* width, int* height) const return image_buffer; } -u32 CVolumeGC::GetFSTSize() const +u64 CVolumeGC::GetFSTSize() const { if (m_pReader == nullptr) return 0; @@ -167,6 +169,11 @@ std::string CVolumeGC::GetApploaderDate() const return DecodeString(date); } +bool CVolumeGC::IsCompressed() const +{ + return m_pReader ? m_pReader->IsCompressed() : false; +} + u64 CVolumeGC::GetSize() const { if (m_pReader) @@ -228,13 +235,13 @@ bool CVolumeGC::LoadBannerFile() const else { m_banner_file_type = BANNER_INVALID; - WARN_LOG(DISCIO, "Invalid opening.bnr. Type: %0x Size: %0lx", bannerSignature, (unsigned long)file_size); + WARN_LOG(DISCIO, "Invalid opening.bnr. Type: %0x Size: %0zx", bannerSignature, file_size); } } else { m_banner_file_type = BANNER_INVALID; - WARN_LOG(DISCIO, "Invalid opening.bnr. Size: %0lx", (unsigned long)file_size); + WARN_LOG(DISCIO, "Invalid opening.bnr. Size: %0zx", file_size); } return m_banner_file_type != BANNER_INVALID; @@ -248,7 +255,7 @@ std::map<IVolume::ELanguage, std::string> CVolumeGC::ReadMultiLanguageStrings(bo return strings; u32 number_of_languages = 0; - ELanguage start_language; + ELanguage start_language = LANGUAGE_UNKNOWN; bool is_japanese = GetCountry() == ECountry::COUNTRY_JAPAN; switch (m_banner_file_type) |
