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

Read Wii disc metadata from the unencrypted header
This commit is contained in:
Mat M 2018-09-28 00:44:25 -04:00 committed by GitHub
commit a1db82a72e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 14 additions and 15 deletions

View File

@ -62,8 +62,10 @@ public:
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 @@ public:
{
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 @@ public:
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;

View File

@ -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)