System: Don't try to preload multi-disc images

This commit is contained in:
Connor McLaughlin 2021-06-27 13:52:43 +10:00
parent 06b009f361
commit bc1331208b

View file

@ -652,6 +652,15 @@ std::unique_ptr<CDImage> OpenCDImage(const char* path, Common::Error* error, boo
return {}; return {};
if (force_preload || g_settings.cdrom_load_image_to_ram) if (force_preload || g_settings.cdrom_load_image_to_ram)
{
if (media->HasSubImages())
{
g_host_interface->AddFormattedOSDMessage(
15.0f,
g_host_interface->TranslateString("OSDMessage", "CD image preloading not available for multi-disc image '%s'"),
FileSystem::GetDisplayNameFromPath(media->GetFileName()).c_str());
}
else
{ {
HostInterfaceProgressCallback callback; HostInterfaceProgressCallback callback;
std::unique_ptr<CDImage> memory_image = CDImage::CreateMemoryImage(media.get(), &callback); std::unique_ptr<CDImage> memory_image = CDImage::CreateMemoryImage(media.get(), &callback);
@ -660,6 +669,7 @@ std::unique_ptr<CDImage> OpenCDImage(const char* path, Common::Error* error, boo
else else
Log_WarningPrintf("Failed to preload image '%s' to RAM", path); Log_WarningPrintf("Failed to preload image '%s' to RAM", path);
} }
}
if (check_for_patches) if (check_for_patches)
{ {