mirror of
https://github.com/RetroDECK/Duckstation.git
synced 2024-11-23 06:15:38 +00:00
System: Add missing icons to some OSD messages
This commit is contained in:
parent
f27a28b58c
commit
928d137111
|
@ -3242,25 +3242,29 @@ bool System::InsertMedia(const char* path)
|
|||
std::unique_ptr<CDImage> image = CDImage::Open(path, g_settings.cdrom_load_image_patches, &error);
|
||||
if (!image)
|
||||
{
|
||||
Host::AddFormattedOSDMessage(10.0f, TRANSLATE("OSDMessage", "Failed to open disc image '%s': %s."), path,
|
||||
error.GetDescription().c_str());
|
||||
Host::AddIconOSDMessage(
|
||||
"DiscInserted", ICON_FA_COMPACT_DISC,
|
||||
fmt::format(TRANSLATE_FS("OSDMessage", "Failed to open disc image '{}': {}."), path, error.GetDescription()),
|
||||
Host::OSD_ERROR_DURATION);
|
||||
return false;
|
||||
}
|
||||
|
||||
const DiscRegion region = GetRegionForImage(image.get());
|
||||
UpdateRunningGame(path, image.get(), false);
|
||||
CDROM::InsertMedia(std::move(image), region);
|
||||
Log_InfoPrintf("Inserted media from %s (%s, %s)", s_running_game_path.c_str(), s_running_game_serial.c_str(),
|
||||
s_running_game_title.c_str());
|
||||
Log_InfoFmt("Inserted media from {} ({}, {})", s_running_game_path, s_running_game_serial, s_running_game_title);
|
||||
if (g_settings.cdrom_load_image_to_ram)
|
||||
CDROM::PrecacheMedia();
|
||||
|
||||
Host::AddFormattedOSDMessage(10.0f, TRANSLATE("OSDMessage", "Inserted disc '%s' (%s)."), s_running_game_title.c_str(),
|
||||
s_running_game_serial.c_str());
|
||||
Host::AddIconOSDMessage(
|
||||
"DiscInserted", ICON_FA_COMPACT_DISC,
|
||||
fmt::format(TRANSLATE_FS("OSDMessage", "Inserted disc '{}' ({})."), s_running_game_title, s_running_game_serial),
|
||||
Host::OSD_INFO_DURATION);
|
||||
|
||||
if (g_settings.HasAnyPerGameMemoryCards())
|
||||
{
|
||||
Host::AddOSDMessage(TRANSLATE_STR("System", "Game changed, reloading memory cards."), 10.0f);
|
||||
Host::AddIconOSDMessage("ReloadMemoryCardsFromGameChange", ICON_FA_SD_CARD,
|
||||
TRANSLATE_STR("System", "Game changed, reloading memory cards."), Host::OSD_INFO_DURATION);
|
||||
UpdatePerGameMemoryCards();
|
||||
}
|
||||
|
||||
|
@ -3486,9 +3490,11 @@ void System::CheckForSettingsChanges(const Settings& old_settings)
|
|||
const bool recreate_device = (g_settings.gpu_use_debug_device != old_settings.gpu_use_debug_device ||
|
||||
g_settings.gpu_threaded_presentation != old_settings.gpu_threaded_presentation);
|
||||
|
||||
Host::AddFormattedOSDMessage(5.0f, TRANSLATE("OSDMessage", "Switching to %s%s GPU renderer."),
|
||||
Host::AddIconOSDMessage("RendererSwitch", ICON_FA_PAINT_ROLLER,
|
||||
fmt::format(TRANSLATE_FS("OSDMessage", "Switching to {}{} GPU renderer."),
|
||||
Settings::GetRendererName(g_settings.gpu_renderer),
|
||||
g_settings.gpu_use_debug_device ? " (debug)" : "");
|
||||
g_settings.gpu_use_debug_device ? " (debug)" : ""),
|
||||
Host::OSD_INFO_DURATION);
|
||||
RecreateGPU(g_settings.gpu_renderer, recreate_device);
|
||||
}
|
||||
|
||||
|
@ -3510,8 +3516,10 @@ void System::CheckForSettingsChanges(const Settings& old_settings)
|
|||
{
|
||||
if (g_settings.audio_backend != old_settings.audio_backend)
|
||||
{
|
||||
Host::AddFormattedOSDMessage(5.0f, TRANSLATE("OSDMessage", "Switching to %s audio backend."),
|
||||
Settings::GetAudioBackendName(g_settings.audio_backend));
|
||||
Host::AddIconOSDMessage("AudioBackendSwitch", ICON_FA_HEADPHONES,
|
||||
fmt::format(TRANSLATE_FS("OSDMessage", "Switching to {} audio backend."),
|
||||
Settings::GetAudioBackendName(g_settings.audio_backend)),
|
||||
Host::OSD_INFO_DURATION);
|
||||
}
|
||||
|
||||
SPU::RecreateOutputStream();
|
||||
|
@ -3532,10 +3540,11 @@ void System::CheckForSettingsChanges(const Settings& old_settings)
|
|||
if (g_settings.cpu_execution_mode != old_settings.cpu_execution_mode ||
|
||||
g_settings.cpu_fastmem_mode != old_settings.cpu_fastmem_mode)
|
||||
{
|
||||
Host::AddOSDMessage(fmt::format(TRANSLATE_FS("OSDMessage", "Switching to {} CPU execution mode."),
|
||||
Host::AddIconOSDMessage("CPUExecutionModeSwitch", ICON_FA_MICROCHIP,
|
||||
fmt::format(TRANSLATE_FS("OSDMessage", "Switching to {} CPU execution mode."),
|
||||
TRANSLATE_SV("CPUExecutionMode", Settings::GetCPUExecutionModeDisplayName(
|
||||
g_settings.cpu_execution_mode))),
|
||||
5.0f);
|
||||
Host::OSD_INFO_DURATION);
|
||||
CPU::ExecutionModeChanged();
|
||||
if (old_settings.cpu_execution_mode != CPUExecutionMode::Interpreter)
|
||||
CPU::CodeCache::Shutdown();
|
||||
|
@ -3550,7 +3559,9 @@ void System::CheckForSettingsChanges(const Settings& old_settings)
|
|||
g_settings.cpu_recompiler_icache != old_settings.cpu_recompiler_icache ||
|
||||
g_settings.bios_tty_logging != old_settings.bios_tty_logging))
|
||||
{
|
||||
Host::AddOSDMessage(TRANSLATE_STR("OSDMessage", "Recompiler options changed, flushing all blocks."), 5.0f);
|
||||
Host::AddIconOSDMessage("CPUFlushAllBlocks", ICON_FA_MICROCHIP,
|
||||
TRANSLATE_STR("OSDMessage", "Recompiler options changed, flushing all blocks."),
|
||||
Host::OSD_INFO_DURATION);
|
||||
CPU::ExecutionModeChanged();
|
||||
CPU::CodeCache::Reset();
|
||||
|
||||
|
|
Loading…
Reference in a new issue