Merge pull request #6563 from JosJuice/fix-wii-banner-load

Fix loading Wii banners for games that initially were cached without banners
This commit is contained in:
Léo Lam 2018-03-31 14:59:09 +02:00 committed by GitHub
commit df0d1c8138
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 6 additions and 7 deletions

View File

@ -221,14 +221,13 @@ bool GameFile::BannerChanged()
if (!DiscIO::IsWii(m_platform)) if (!DiscIO::IsWii(m_platform))
return false; return false;
m_volume_banner.buffer = m_pending.volume_banner.buffer =
DiscIO::WiiSaveBanner(m_title_id).GetBanner(&m_volume_banner.width, &m_volume_banner.height); DiscIO::WiiSaveBanner(m_title_id)
if (m_volume_banner.buffer.empty()) .GetBanner(&m_pending.volume_banner.width, &m_pending.volume_banner.height);
return false;
// We only reach here if m_volume_banner was empty, so we can always return true // We only reach here if the old banner was empty, so if the new banner isn't empty,
// without needing any extra check to know whether the banners are different // the new banner is guaranteed to be different from the old banner
return true; return !m_pending.volume_banner.buffer.empty();
} }
void GameFile::BannerCommit() void GameFile::BannerCommit()