mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-07-21 21:30:19 -06:00
GameFile: Support HBC-style XML metadata
This feature was originally exclusive to the previous iteration of DolphinQt (the one that was the reason for the current iteration being named DolphinQt2 initially). https://bugs.dolphin-emu.org/issues/8949
This commit is contained in:
@ -52,8 +52,8 @@ public:
|
||||
const std::string& GetFilePath() const { return m_file_path; }
|
||||
const std::string& GetFileName() const { return m_file_name; }
|
||||
const std::string& GetName(const Core::TitleDatabase& title_database) const;
|
||||
const std::string& GetName(bool long_name = true) const;
|
||||
const std::string& GetMaker(bool long_maker = true) const;
|
||||
const std::string& GetName(bool allow_custom_name, bool long_name = true) const;
|
||||
const std::string& GetMaker(bool allow_custom_maker, bool long_maker = true) const;
|
||||
const std::string& GetShortName(DiscIO::Language l) const { return Lookup(l, m_short_names); }
|
||||
const std::string& GetShortName() const { return LookupUsingConfigLanguage(m_short_names); }
|
||||
const std::string& GetLongName(DiscIO::Language l) const { return Lookup(l, m_long_names); }
|
||||
@ -63,7 +63,7 @@ public:
|
||||
const std::string& GetLongMaker(DiscIO::Language l) const { return Lookup(l, m_long_makers); }
|
||||
const std::string& GetLongMaker() const { return LookupUsingConfigLanguage(m_long_makers); }
|
||||
const std::string& GetDescription(DiscIO::Language l) const { return Lookup(l, m_descriptions); }
|
||||
const std::string& GetDescription() const { return LookupUsingConfigLanguage(m_descriptions); }
|
||||
const std::string& GetDescription(bool allow_custom_description) const;
|
||||
std::vector<DiscIO::Language> GetLanguages() const;
|
||||
const std::string& GetInternalName() const { return m_internal_name; }
|
||||
const std::string& GetGameID() const { return m_game_id; }
|
||||
@ -85,6 +85,8 @@ public:
|
||||
const GameBanner& GetBannerImage() const;
|
||||
const GameCover& GetCoverImage() const;
|
||||
void DoState(PointerWrap& p);
|
||||
bool XMLMetadataChanged();
|
||||
void XMLMetadataCommit();
|
||||
bool WiiBannerChanged();
|
||||
void WiiBannerCommit();
|
||||
bool CustomBannerChanged();
|
||||
@ -102,6 +104,7 @@ private:
|
||||
const std::string&
|
||||
LookupUsingConfigLanguage(const std::map<DiscIO::Language, std::string>& strings) const;
|
||||
bool IsElfOrDol() const;
|
||||
bool ReadXMLMetadata(const std::string& path);
|
||||
bool ReadPNGBanner(const std::string& path);
|
||||
|
||||
// IMPORTANT: Nearly all data members must be save/restored in DoState.
|
||||
@ -134,6 +137,9 @@ private:
|
||||
u8 m_disc_number{};
|
||||
std::string m_apploader_date;
|
||||
|
||||
std::string m_custom_name;
|
||||
std::string m_custom_description;
|
||||
std::string m_custom_maker;
|
||||
GameBanner m_volume_banner{};
|
||||
GameBanner m_custom_banner{};
|
||||
GameCover m_default_cover{};
|
||||
@ -143,6 +149,9 @@ private:
|
||||
// of GameFiles in a threadsafe way. They should not be handled in DoState.
|
||||
struct
|
||||
{
|
||||
std::string custom_name;
|
||||
std::string custom_description;
|
||||
std::string custom_maker;
|
||||
GameBanner volume_banner;
|
||||
GameBanner custom_banner;
|
||||
GameCover default_cover;
|
||||
|
Reference in New Issue
Block a user