diff options
| author | Léo Lam <leo@leolam.fr> | 2019-11-09 22:59:26 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2019-11-09 22:59:26 +0100 |
| commit | 08b191ee8e4ec0de2fca2054f678df816e0b1db1 (patch) | |
| tree | cc6a8c7111d367dd83834a5e7ee246b1928767d2 /Source/Core/UICommon/GameFileCache.cpp | |
| parent | 37f1c958f8d25e6387d85603e6beb77b00d52c51 (diff) | |
| parent | d8958fbdf7fa123d61c453989483b7116727d4be (diff) | |
Merge pull request #8313 from JosJuice/gamelist-xml
GameFile: Support HBC-style XML metadata
Diffstat (limited to 'Source/Core/UICommon/GameFileCache.cpp')
| -rw-r--r-- | Source/Core/UICommon/GameFileCache.cpp | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/Source/Core/UICommon/GameFileCache.cpp b/Source/Core/UICommon/GameFileCache.cpp index fa83ed66e0..07cbf726c4 100644 --- a/Source/Core/UICommon/GameFileCache.cpp +++ b/Source/Core/UICommon/GameFileCache.cpp @@ -27,7 +27,7 @@ namespace UICommon { -static constexpr u32 CACHE_REVISION = 15; // Last changed in PR 7816 +static constexpr u32 CACHE_REVISION = 16; // Last changed in PR 8313 std::vector<std::string> FindAllGamePaths(const std::vector<std::string>& directories_to_scan, bool recursive_scan) @@ -166,6 +166,7 @@ bool GameFileCache::UpdateAdditionalMetadata( bool GameFileCache::UpdateAdditionalMetadata(std::shared_ptr<GameFile>* game_file) { + const bool xml_metadata_changed = (*game_file)->XMLMetadataChanged(); const bool wii_banner_changed = (*game_file)->WiiBannerChanged(); const bool custom_banner_changed = (*game_file)->CustomBannerChanged(); @@ -174,14 +175,18 @@ bool GameFileCache::UpdateAdditionalMetadata(std::shared_ptr<GameFile>* game_fil const bool default_cover_changed = (*game_file)->DefaultCoverChanged(); const bool custom_cover_changed = (*game_file)->CustomCoverChanged(); - if (!wii_banner_changed && !custom_banner_changed && !default_cover_changed && - !custom_cover_changed) + if (!xml_metadata_changed && !wii_banner_changed && !custom_banner_changed && + !default_cover_changed && !custom_cover_changed) + { return false; + } // If a cached file needs an update, apply the updates to a copy and delete the original. // This makes the usage of cached files in other threads safe. std::shared_ptr<GameFile> copy = std::make_shared<GameFile>(**game_file); + if (xml_metadata_changed) + copy->XMLMetadataCommit(); if (wii_banner_changed) copy->WiiBannerCommit(); if (custom_banner_changed) |
