Permalink
Browse files

Merge pull request #7411 from JosJuice/wii-metadata-unencrypted

Read Wii disc metadata from the unencrypted header
  • Loading branch information...
lioncash committed Sep 28, 2018
2 parents a5c74cd + cec601f commit a1db82a72eb91f9e6f2e971311b9d4ead16359b9
Showing with 14 additions and 15 deletions.
  1. +13 −14 Source/Core/DiscIO/Volume.h
  2. +1 −1 Source/Core/UICommon/GameFileCache.cpp
@@ -62,8 +62,10 @@ class Volume
virtual std::vector<Partition> GetPartitions() const { return {}; }
virtual Partition GetGamePartition() const { return PARTITION_NONE; }
virtual std::optional<u32> GetPartitionType(const Partition& partition) const { return {}; }
std::optional<u64> GetTitleID() const { return GetTitleID(GetGamePartition()); }
virtual std::optional<u64> GetTitleID(const Partition& partition) const { return {}; }
virtual std::optional<u64> GetTitleID(const Partition& partition = PARTITION_NONE) const
{
return {};
}
virtual const IOS::ES::TicketReader& GetTicket(const Partition& partition) const
{
return INVALID_TICKET;
@@ -75,14 +77,10 @@ class Volume
{
return offset;
}
std::string GetGameID() const { return GetGameID(GetGamePartition()); }
virtual std::string GetGameID(const Partition& partition) const = 0;
std::string GetMakerID() const { return GetMakerID(GetGamePartition()); }
virtual std::string GetMakerID(const Partition& partition) const = 0;
std::optional<u16> GetRevision() const { return GetRevision(GetGamePartition()); }
virtual std::optional<u16> GetRevision(const Partition& partition) const = 0;
std::string GetInternalName() const { return GetInternalName(GetGamePartition()); }
virtual std::string GetInternalName(const Partition& partition) const = 0;
virtual std::string GetGameID(const Partition& partition = PARTITION_NONE) const = 0;
virtual std::string GetMakerID(const Partition& partition = PARTITION_NONE) const = 0;
virtual std::optional<u16> GetRevision(const Partition& partition = PARTITION_NONE) const = 0;
virtual std::string GetInternalName(const Partition& partition = PARTITION_NONE) const = 0;
virtual std::map<Language, std::string> GetShortNames() const { return {}; }
virtual std::map<Language, std::string> GetLongNames() const { return {}; }
virtual std::map<Language, std::string> GetShortMakers() const { return {}; }
@@ -92,15 +90,16 @@ class Volume
std::string GetApploaderDate() const { return GetApploaderDate(GetGamePartition()); }
virtual std::string GetApploaderDate(const Partition& partition) const = 0;
// 0 is the first disc, 1 is the second disc
std::optional<u8> GetDiscNumber() const { return GetDiscNumber(GetGamePartition()); }
virtual std::optional<u8> GetDiscNumber(const Partition& partition) const { return 0; }
virtual std::optional<u8> GetDiscNumber(const Partition& partition = PARTITION_NONE) const
{
return 0;
}
virtual Platform GetVolumeType() const = 0;
virtual bool SupportsIntegrityCheck() const { return false; }
virtual bool CheckIntegrity(const Partition& partition) const { return false; }
// May be inaccurate for WADs
virtual Region GetRegion() const = 0;
Country GetCountry() const { return GetCountry(GetGamePartition()); }
virtual Country GetCountry(const Partition& partition) const = 0;
virtual Country GetCountry(const Partition& partition = PARTITION_NONE) const = 0;
virtual BlobType GetBlobType() const = 0;
// Size of virtual disc (may be inaccurate depending on the blob type)
virtual u64 GetSize() const = 0;
@@ -27,7 +27,7 @@
namespace UICommon
{
static constexpr u32 CACHE_REVISION = 12; // Last changed in PR 7285
static constexpr u32 CACHE_REVISION = 13; // Last changed in PR 7411
std::vector<std::string> FindAllGamePaths(const std::vector<std::string>& directories_to_scan,
bool recursive_scan)

0 comments on commit a1db82a

Please sign in to comment.