System: Fix subimage change OSD message

This commit is contained in:
Stenzek 2025-01-12 19:03:53 +10:00
parent be7cff5964
commit 035762af94
No known key found for this signature in database
1 changed files with 6 additions and 5 deletions

View File

@ -4302,7 +4302,8 @@ bool System::SwitchMediaSubImage(u32 index)
{ {
Host::AddIconOSDMessage("MediaSwitchSubImage", ICON_FA_COMPACT_DISC, Host::AddIconOSDMessage("MediaSwitchSubImage", ICON_FA_COMPACT_DISC,
fmt::format(TRANSLATE_FS("System", "Failed to switch to subimage {} in '{}': {}."), fmt::format(TRANSLATE_FS("System", "Failed to switch to subimage {} in '{}': {}."),
index + 1u, Path::GetFileName(image->GetPath()), error.GetDescription()), index + 1u, FileSystem::GetDisplayNameFromPath(image->GetPath()),
error.GetDescription()),
Host::OSD_INFO_DURATION); Host::OSD_INFO_DURATION);
// restore old disc // restore old disc
@ -4313,10 +4314,10 @@ bool System::SwitchMediaSubImage(u32 index)
return false; return false;
} }
Host::AddIconOSDMessage("MediaSwitchSubImage", ICON_FA_COMPACT_DISC, Host::AddIconOSDMessage(
fmt::format(TRANSLATE_FS("System", "Switched to sub-image {} ({}) in '{}'."), subimage_title, "MediaSwitchSubImage", ICON_FA_COMPACT_DISC,
title, index + 1u, Path::GetFileName(CDROM::GetMediaPath())), fmt::format(TRANSLATE_FS("System", "Switched to sub-image {} ({}) in '{}'."), subimage_title, index + 1u, title),
Host::OSD_INFO_DURATION); Host::OSD_INFO_DURATION);
return true; return true;
} }