Skip to content

Commit

Permalink
System: Fix subimage change OSD message
Browse files Browse the repository at this point in the history
  • Loading branch information
stenzek committed Jan 12, 2025
1 parent be7cff5 commit 035762a
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions src/core/system.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -4302,7 +4302,8 @@ bool System::SwitchMediaSubImage(u32 index)
{
Host::AddIconOSDMessage("MediaSwitchSubImage", ICON_FA_COMPACT_DISC,
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);

// restore old disc
Expand All @@ -4313,10 +4314,10 @@ bool System::SwitchMediaSubImage(u32 index)
return false;
}

Host::AddIconOSDMessage("MediaSwitchSubImage", ICON_FA_COMPACT_DISC,
fmt::format(TRANSLATE_FS("System", "Switched to sub-image {} ({}) in '{}'."), subimage_title,
title, index + 1u, Path::GetFileName(CDROM::GetMediaPath())),
Host::OSD_INFO_DURATION);
Host::AddIconOSDMessage(
"MediaSwitchSubImage", ICON_FA_COMPACT_DISC,
fmt::format(TRANSLATE_FS("System", "Switched to sub-image {} ({}) in '{}'."), subimage_title, index + 1u, title),
Host::OSD_INFO_DURATION);
return true;
}

Expand Down

0 comments on commit 035762a

Please # to comment.