diff options
| author | Léo Lam <leo@innovatetechnologi.es> | 2018-05-20 15:39:07 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2018-05-20 15:39:07 +0200 |
| commit | 56e91bfdc178ce575a5f252ca03671a9f68ee6d8 (patch) | |
| tree | 94bd53000fce61c0dd39c7aad891021ca075c864 /Source/Core/UICommon/GameFileCache.cpp | |
| parent | 86c676ab0483dc53b3b08cb327816388d278a600 (diff) | |
| parent | cc42b4354d38055629ba3eeac92fa57582a26de0 (diff) | |
Merge pull request #6429 from JosJuice/png-banners-uicommon
Reimplement custom PNG banners in game list
Diffstat (limited to 'Source/Core/UICommon/GameFileCache.cpp')
| -rw-r--r-- | Source/Core/UICommon/GameFileCache.cpp | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/Source/Core/UICommon/GameFileCache.cpp b/Source/Core/UICommon/GameFileCache.cpp index 9c18b78e81..9dc25740f9 100644 --- a/Source/Core/UICommon/GameFileCache.cpp +++ b/Source/Core/UICommon/GameFileCache.cpp @@ -28,7 +28,7 @@ namespace UICommon { -static constexpr u32 CACHE_REVISION = 9; // Last changed in PR 6569 +static constexpr u32 CACHE_REVISION = 10; // Last changed in PR 6429 std::vector<std::string> FindAllGamePaths(const std::vector<std::string>& directories_to_scan, bool recursive_scan) @@ -138,17 +138,20 @@ bool GameFileCache::UpdateAdditionalMetadata(const Core::TitleDatabase& title_da bool GameFileCache::UpdateAdditionalMetadata(std::shared_ptr<GameFile>* game_file, const Core::TitleDatabase& title_database) { - const bool banner_changed = (*game_file)->BannerChanged(); + const bool wii_banner_changed = (*game_file)->WiiBannerChanged(); + const bool custom_banner_changed = (*game_file)->CustomBannerChanged(); const bool custom_title_changed = (*game_file)->CustomNameChanged(title_database); - if (!banner_changed && !custom_title_changed) + if (!wii_banner_changed && !custom_banner_changed && !custom_title_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 (banner_changed) - copy->BannerCommit(); + if (wii_banner_changed) + copy->WiiBannerCommit(); + if (custom_banner_changed) + copy->CustomBannerCommit(); if (custom_title_changed) copy->CustomNameCommit(); *game_file = std::move(copy); |
