System: Move overlay checking to common

This commit is contained in:
Connor McLaughlin
2022-08-27 16:52:24 +10:00
parent ea8d779962
commit 3a5bf6d29b
10 changed files with 119 additions and 80 deletions

View File

@ -1307,7 +1307,7 @@ void Achievements::GameChanged(const std::string& path, CDImage* image)
if (!path.empty() && (!image || (g_settings.achievements_use_first_disc_from_playlist && image->HasSubImages() &&
image->GetCurrentSubImage() != 0)))
{
temp_image = CDImage::Open(path.c_str(), nullptr);
temp_image = CDImage::Open(path.c_str(), g_settings.cdrom_load_image_patches, nullptr);
image = temp_image.get();
if (!temp_image)
{
@ -1336,7 +1336,8 @@ void Achievements::GameChanged(const std::string& path, CDImage* image)
if (image && image->HasSubImages() && image->GetCurrentSubImage() != 0)
{
std::unique_ptr<CDImage> image_copy(CDImage::Open(image->GetFileName().c_str(), nullptr));
std::unique_ptr<CDImage> image_copy(
CDImage::Open(image->GetFileName().c_str(), g_settings.cdrom_load_image_patches, nullptr));
if (!image_copy)
{
Log_ErrorPrintf("Failed to reopen image '%s'", image->GetFileName().c_str());

View File

@ -164,7 +164,7 @@ bool GameList::GetPsfListEntry(const std::string& path, Entry* entry)
bool GameList::GetDiscListEntry(const std::string& path, Entry* entry)
{
std::unique_ptr<CDImage> cdi = CDImage::Open(path.c_str(), nullptr);
std::unique_ptr<CDImage> cdi = CDImage::Open(path.c_str(), false, nullptr);
if (!cdi)
return false;