mirror of
https://github.com/RetroDECK/Duckstation.git
synced 2024-11-26 23:55:40 +00:00
System: Don't try to preload multi-disc images
This commit is contained in:
parent
06b009f361
commit
bc1331208b
|
@ -653,12 +653,22 @@ std::unique_ptr<CDImage> OpenCDImage(const char* path, Common::Error* error, boo
|
||||||
|
|
||||||
if (force_preload || g_settings.cdrom_load_image_to_ram)
|
if (force_preload || g_settings.cdrom_load_image_to_ram)
|
||||||
{
|
{
|
||||||
HostInterfaceProgressCallback callback;
|
if (media->HasSubImages())
|
||||||
std::unique_ptr<CDImage> memory_image = CDImage::CreateMemoryImage(media.get(), &callback);
|
{
|
||||||
if (memory_image)
|
g_host_interface->AddFormattedOSDMessage(
|
||||||
media = std::move(memory_image);
|
15.0f,
|
||||||
|
g_host_interface->TranslateString("OSDMessage", "CD image preloading not available for multi-disc image '%s'"),
|
||||||
|
FileSystem::GetDisplayNameFromPath(media->GetFileName()).c_str());
|
||||||
|
}
|
||||||
else
|
else
|
||||||
Log_WarningPrintf("Failed to preload image '%s' to RAM", path);
|
{
|
||||||
|
HostInterfaceProgressCallback callback;
|
||||||
|
std::unique_ptr<CDImage> memory_image = CDImage::CreateMemoryImage(media.get(), &callback);
|
||||||
|
if (memory_image)
|
||||||
|
media = std::move(memory_image);
|
||||||
|
else
|
||||||
|
Log_WarningPrintf("Failed to preload image '%s' to RAM", path);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (check_for_patches)
|
if (check_for_patches)
|
||||||
|
|
Loading…
Reference in a new issue