From e0a47c11f5653ecffb79adfac29c19a163baab8f Mon Sep 17 00:00:00 2001 From: JosJuice Date: Mon, 10 Aug 2015 16:35:23 +0200 Subject: Fix reading Wii FST size (for real this time) 04fcb72 fixed an issue with reading the Wii FST size, but I found a second issue when working on PR #2820 - the size must be shifted left by 2. DiscScrubber and Boot already do this correctly using separate code. --- Source/Core/DiscIO/VolumeGC.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'Source/Core/DiscIO/VolumeGC.cpp') diff --git a/Source/Core/DiscIO/VolumeGC.cpp b/Source/Core/DiscIO/VolumeGC.cpp index f2e54bdde8..b73159b083 100644 --- a/Source/Core/DiscIO/VolumeGC.cpp +++ b/Source/Core/DiscIO/VolumeGC.cpp @@ -143,7 +143,7 @@ std::vector CVolumeGC::GetBanner(int* width, int* height) const return image_buffer; } -u32 CVolumeGC::GetFSTSize() const +u64 CVolumeGC::GetFSTSize() const { if (m_pReader == nullptr) return 0; -- cgit v1.2.3 From 1db1a8aacf7c5d0d8a7e36f2c6f2e452b0971ed0 Mon Sep 17 00:00:00 2001 From: Lioncash Date: Mon, 31 Aug 2015 19:27:18 -0400 Subject: VolumeCreator: Use a unique_ptr in CreateVolumeFromFilename --- Source/Core/DiscIO/VolumeGC.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'Source/Core/DiscIO/VolumeGC.cpp') diff --git a/Source/Core/DiscIO/VolumeGC.cpp b/Source/Core/DiscIO/VolumeGC.cpp index f2e54bdde8..f6b4c6ae64 100644 --- a/Source/Core/DiscIO/VolumeGC.cpp +++ b/Source/Core/DiscIO/VolumeGC.cpp @@ -6,6 +6,7 @@ #include #include #include +#include #include #include "Common/ColorUtil.h" @@ -20,8 +21,8 @@ namespace DiscIO { -CVolumeGC::CVolumeGC(IBlobReader* _pReader) - : m_pReader(_pReader) +CVolumeGC::CVolumeGC(std::unique_ptr reader) + : m_pReader(std::move(reader)) {} CVolumeGC::~CVolumeGC() -- cgit v1.2.3 From 4a2e680ed29b1a10f1020fa2bf9521086ebbdc32 Mon Sep 17 00:00:00 2001 From: Lioncash Date: Sat, 5 Sep 2015 23:05:26 -0400 Subject: VolumeGC: Initialize a variable Silences an uninitialized variable warning --- Source/Core/DiscIO/VolumeGC.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'Source/Core/DiscIO/VolumeGC.cpp') diff --git a/Source/Core/DiscIO/VolumeGC.cpp b/Source/Core/DiscIO/VolumeGC.cpp index f6b4c6ae64..3e1044c42a 100644 --- a/Source/Core/DiscIO/VolumeGC.cpp +++ b/Source/Core/DiscIO/VolumeGC.cpp @@ -249,7 +249,7 @@ std::map 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) -- cgit v1.2.3 From 19459e827f6c15f9429598015019ecb66f2e6cad Mon Sep 17 00:00:00 2001 From: Lioncash Date: Tue, 8 Sep 2015 01:44:37 -0400 Subject: Partially revert "General: Toss out PRI macro usage" --- Source/Core/DiscIO/VolumeGC.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'Source/Core/DiscIO/VolumeGC.cpp') diff --git a/Source/Core/DiscIO/VolumeGC.cpp b/Source/Core/DiscIO/VolumeGC.cpp index 3e1044c42a..0efd0c6bf4 100644 --- a/Source/Core/DiscIO/VolumeGC.cpp +++ b/Source/Core/DiscIO/VolumeGC.cpp @@ -229,13 +229,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; -- cgit v1.2.3 From 6935d281128ea78169ecde44e869f83a7b67ddb8 Mon Sep 17 00:00:00 2001 From: JosJuice Date: Sat, 26 Sep 2015 15:24:29 +0200 Subject: Display all compressed formats in blue in GUI In the past, only GCZ was shown as compressed, not CISO and WBFS. --- Source/Core/DiscIO/VolumeGC.cpp | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'Source/Core/DiscIO/VolumeGC.cpp') diff --git a/Source/Core/DiscIO/VolumeGC.cpp b/Source/Core/DiscIO/VolumeGC.cpp index e0d17f17ee..319955a133 100644 --- a/Source/Core/DiscIO/VolumeGC.cpp +++ b/Source/Core/DiscIO/VolumeGC.cpp @@ -168,6 +168,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) -- cgit v1.2.3 From cc036ca86cdaf709e01221975da734cb64d54a94 Mon Sep 17 00:00:00 2001 From: Lioncash Date: Sat, 26 Sep 2015 17:13:07 -0400 Subject: Common: Remove other Common prefixed headers from Common.h --- Source/Core/DiscIO/VolumeGC.cpp | 1 + 1 file changed, 1 insertion(+) (limited to 'Source/Core/DiscIO/VolumeGC.cpp') diff --git a/Source/Core/DiscIO/VolumeGC.cpp b/Source/Core/DiscIO/VolumeGC.cpp index e0d17f17ee..ce7eb69f78 100644 --- a/Source/Core/DiscIO/VolumeGC.cpp +++ b/Source/Core/DiscIO/VolumeGC.cpp @@ -11,6 +11,7 @@ #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" -- cgit v1.2.3