diff --git a/src/core/gpu_hw.cpp b/src/core/gpu_hw.cpp index 1c16a529..b4a48849 100644 --- a/src/core/gpu_hw.cpp +++ b/src/core/gpu_hw.cpp @@ -75,11 +75,6 @@ bool GPU_HW::Initialize(HostDisplay* host_display) } if (!m_supports_dual_source_blend && TextureFilterRequiresDualSourceBlend(m_texture_filtering)) { - g_host_interface->AddFormattedOSDMessage( - 20.0f, - g_host_interface->TranslateString("OSDMessage", - "Texture filter '%s' is not supported with the current renderer."), - Settings::GetTextureFilterDisplayName(m_texture_filtering)); m_texture_filtering = GPUTextureFilter::Nearest; } if (!m_supports_adaptive_downsampling && g_settings.gpu_resolution_scale > 1 && @@ -151,30 +146,6 @@ void GPU_HW::UpdateHWSettings(bool* framebuffer_changed, bool* shaders_changed) m_downsample_mode != downsample_mode || m_pgxp_depth_buffer != g_settings.UsingPGXPDepthBuffer() || m_disable_color_perspective != disable_color_perspective); - if (m_resolution_scale != resolution_scale) - { - g_host_interface->AddFormattedOSDMessage( - 10.0f, g_host_interface->TranslateString("OSDMessage", "Resolution scale set to %ux (display %ux%u, VRAM %ux%u)"), - resolution_scale, m_crtc_state.display_vram_width * resolution_scale, - resolution_scale * m_crtc_state.display_vram_height, VRAM_WIDTH * resolution_scale, - VRAM_HEIGHT * resolution_scale); - } - - if (m_multisamples != multisamples || m_per_sample_shading != per_sample_shading) - { - if (per_sample_shading) - { - g_host_interface->AddFormattedOSDMessage( - 10.0f, g_host_interface->TranslateString("OSDMessage", "Multisample anti-aliasing set to %ux (SSAA)."), - multisamples); - } - else - { - g_host_interface->AddFormattedOSDMessage( - 10.0f, g_host_interface->TranslateString("OSDMessage", "Multisample anti-aliasing set to %ux."), multisamples); - } - } - m_resolution_scale = resolution_scale; m_multisamples = multisamples; m_per_sample_shading = per_sample_shading; diff --git a/src/core/gpu_hw_opengl.cpp b/src/core/gpu_hw_opengl.cpp index 3e173ec2..4cf5ed47 100644 --- a/src/core/gpu_hw_opengl.cpp +++ b/src/core/gpu_hw_opengl.cpp @@ -54,10 +54,8 @@ bool GPU_HW_OpenGL::Initialize(HostDisplay* host_display) (host_display->GetRenderAPI() == HostDisplay::RenderAPI::OpenGLES && GLAD_GL_ES_VERSION_3_0)); if (!opengl_is_available) { - g_host_interface->AddOSDMessage( - g_host_interface->TranslateStdString("OSDMessage", "OpenGL renderer unavailable, your driver or hardware is not " - "recent enough. OpenGL 3.1 or OpenGL ES 3.0 is required."), - 20.0f); + Log_ErrorPrintf("OpenGL renderer unavailable, your driver or hardware is not " + "recent enough. OpenGL 3.1 or OpenGL ES 3.0 is required."); return false; } diff --git a/src/core/host_interface.cpp b/src/core/host_interface.cpp index f6de9125..e64e9638 100644 --- a/src/core/host_interface.cpp +++ b/src/core/host_interface.cpp @@ -282,11 +282,6 @@ void HostInterface::FixIncompatibleSettings(bool display_osd_messages) { if (g_settings.gpu_renderer == GPURenderer::Software) { - if (display_osd_messages) - { - AddOSDMessage( - TranslateStdString("OSDMessage", "PGXP is incompatible with the software renderer, disabling PGXP."), 10.0f); - } g_settings.gpu_pgxp_enable = false; } } @@ -302,13 +297,13 @@ void HostInterface::FixIncompatibleSettings(bool display_osd_messages) #if defined(__ANDROID__) && defined(__arm__) && !defined(__aarch64__) && !defined(_M_ARM64) if (g_settings.rewind_enable) { - AddOSDMessage(TranslateStdString("OSDMessage", "Rewind is not supported on 32-bit ARM for Android."), 30.0f); + Log_WarningPrintf("Rewind is not supported on 32-bit ARM for Android."); g_settings.rewind_enable = false; } if (g_settings.runahead_frames > 0) { - AddOSDMessage(TranslateStdString("OSDMessage", "Runahead is not supported on 32-bit ARM for Android."), 30.0f); + Log_WarningPrintf("Runahead is not supported on 32-bit ARM for Android."); g_settings.runahead_frames = 0; } #endif @@ -325,8 +320,6 @@ void HostInterface::CheckForSettingsChanges(const Settings& old_settings) { if (System::IsValid() && (g_settings.gpu_renderer != old_settings.gpu_renderer)) { - AddFormattedOSDMessage(5.0f, TranslateString("OSDMessage", "Switching to %s GPU renderer."), - Settings::GetRendererName(g_settings.gpu_renderer)); RecreateSystem(); } @@ -346,13 +339,6 @@ void HostInterface::CheckForSettingsChanges(const Settings& old_settings) g_settings.cpu_fastmem_mode != old_settings.cpu_fastmem_mode || g_settings.cpu_fastmem_rewrite != old_settings.cpu_fastmem_rewrite) { - if (g_settings.cpu_execution_mode != old_settings.cpu_execution_mode) - { - AddFormattedOSDMessage( - 5.0f, TranslateString("OSDMessage", "Switching to %s CPU execution mode."), - TranslateString("CPUExecutionMode", Settings::GetCPUExecutionModeDisplayName(g_settings.cpu_execution_mode)) - .GetCharArray()); - } CPU::CodeCache::Reinitialize(); CPU::ClearICache(); } @@ -362,7 +348,6 @@ void HostInterface::CheckForSettingsChanges(const Settings& old_settings) g_settings.cpu_recompiler_block_linking != old_settings.cpu_recompiler_block_linking || g_settings.cpu_recompiler_icache != old_settings.cpu_recompiler_icache)) { - AddOSDMessage(TranslateStdString("OSDMessage", "Recompiler options changed, flushing all blocks."), 5.0f); CPU::CodeCache::Flush(); if (g_settings.cpu_recompiler_icache != old_settings.cpu_recompiler_icache) @@ -415,10 +400,6 @@ void HostInterface::CheckForSettingsChanges(const Settings& old_settings) { if (g_settings.IsUsingCodeCache()) { - AddOSDMessage(g_settings.gpu_pgxp_enable ? - TranslateStdString("OSDMessage", "PGXP enabled, recompiling all blocks.") : - TranslateStdString("OSDMessage", "PGXP disabled, recompiling all blocks."), - 5.0f); CPU::CodeCache::Flush(); } @@ -613,8 +594,6 @@ void HostInterface::ToggleSoftwareRendering() const GPURenderer new_renderer = g_gpu->IsHardwareRenderer() ? GPURenderer::Software : g_settings.gpu_renderer; - AddFormattedOSDMessage(5.0f, TranslateString("OSDMessage", "Switching to %s renderer..."), - Settings::GetRendererDisplayName(new_renderer)); System::RecreateGPU(new_renderer); } diff --git a/src/core/memory_card.cpp b/src/core/memory_card.cpp index 58d4f86e..eca87548 100644 --- a/src/core/memory_card.cpp +++ b/src/core/memory_card.cpp @@ -258,9 +258,6 @@ std::unique_ptr MemoryCard::Open(std::string_view filename) if (!mc->LoadFromFile()) { Log_InfoPrintf("Memory card at '%s' could not be read, formatting.", mc->m_filename.c_str()); - g_host_interface->AddFormattedOSDMessage( - 5.0f, g_host_interface->TranslateString("OSDMessage", "Memory card at '%s' could not be read, formatting."), - mc->m_filename.c_str()); mc->Format(); } @@ -291,20 +288,7 @@ bool MemoryCard::SaveIfChanged(bool display_osd_message) return false; if (!MemoryCardImage::SaveToFile(m_data, m_filename.c_str())) - { - if (display_osd_message) - { - g_host_interface->AddFormattedOSDMessage( - 20.0f, g_host_interface->TranslateString("OSDMessage", "Failed to save memory card to '%s'"), - m_filename.c_str()); - } - return false; - } - - if (display_osd_message) - g_host_interface->AddFormattedOSDMessage( - 2.0f, g_host_interface->TranslateString("OSDMessage", "Saved memory card to '%s'"), m_filename.c_str()); return true; } diff --git a/src/core/pad.cpp b/src/core/pad.cpp index a564a0af..18c5e20f 100644 --- a/src/core/pad.cpp +++ b/src/core/pad.cpp @@ -93,11 +93,6 @@ bool Pad::DoStateMemcard(StateWrapper& sw, u32 i) if (card_present_in_state && !m_memory_cards[i]) { - g_host_interface->AddFormattedOSDMessage( - 20.0f, - g_host_interface->TranslateString( - "OSDMessage", "Memory card %u present in save state but not in system. Creating temporary card."), - i + 1u); m_memory_cards[i] = MemoryCard::Create(); } @@ -124,12 +119,6 @@ bool Pad::DoStateMemcard(StateWrapper& sw, u32 i) } else { - g_host_interface->AddFormattedOSDMessage( - 20.0f, - g_host_interface->TranslateString( - "OSDMessage", "Memory card %u from save state does match current card data. Simulating replugging."), - i + 1u); - // this is a potentially serious issue - some games cache info from memcards and jumping around // with savestates can lead to card corruption on the next save attempts (and may not be obvious // until much later). One workaround is to forcibly eject the card for 30+ frames, long enough @@ -138,25 +127,12 @@ bool Pad::DoStateMemcard(StateWrapper& sw, u32 i) m_memory_cards[i]->Reset(); } } - else - { - g_host_interface->AddFormattedOSDMessage( - 20.0f, - g_host_interface->TranslateString("OSDMessage", - "Memory card %u present in save state but not in system. Ignoring card."), - i + 1u); - } return true; } if (!card_present_in_state && m_memory_cards[i]) { - g_host_interface->AddFormattedOSDMessage( - 20.0f, - g_host_interface->TranslateString("OSDMessage", - "Memory card %u present in system but not in save state. Removing card."), - i + 1u); m_memory_cards[i].reset(); } diff --git a/src/core/system.cpp b/src/core/system.cpp index 830d3d13..0a667beb 100644 --- a/src/core/system.cpp +++ b/src/core/system.cpp @@ -543,10 +543,8 @@ std::unique_ptr OpenCDImage(const char* path, Common::Error* error, boo { if (media->HasSubImages() && media->GetSubImageCount() > 1) { - 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()); + Log_WarningPrintf("CD image preloading not available for multi-disc image '%s'", + FileSystem::GetDisplayNameFromPath(media->GetFileName()).c_str()); } else { @@ -568,11 +566,8 @@ std::unique_ptr OpenCDImage(const char* path, Common::Error* error, boo media = CDImage::OverlayPPFPatch(ppf_filename.c_str(), CDImage::OpenFlags::None, std::move(media)); if (!media) { - g_host_interface->AddFormattedOSDMessage( - 30.0f, - g_host_interface->TranslateString("OSDMessage", - "Failed to apply ppf patch from '%s', using unpatched image."), - ppf_filename.c_str()); + Log_WarningPrintf("Failed to apply ppf patch from '%s', using unpatched image.", + ppf_filename.c_str()); return OpenCDImage(path, error, force_preload, false); } } @@ -785,43 +780,6 @@ bool Initialize(bool force_software_renderer) g_mdec.Initialize(); g_sio.Initialize(); - static constexpr float WARNING_DURATION = 15.0f; - - if (g_settings.cpu_overclock_active) - { - g_host_interface->AddFormattedOSDMessage( - WARNING_DURATION, - g_host_interface->TranslateString("OSDMessage", - "CPU clock speed is set to %u%% (%u / %u). This may result in instability."), - g_settings.GetCPUOverclockPercent(), g_settings.cpu_overclock_numerator, g_settings.cpu_overclock_denominator); - } - if (g_settings.cdrom_read_speedup > 1) - { - g_host_interface->AddFormattedOSDMessage( - WARNING_DURATION, - g_host_interface->TranslateString( - "OSDMessage", "CD-ROM read speedup set to %ux (effective speed %ux). This may result in instability."), - g_settings.cdrom_read_speedup, g_settings.cdrom_read_speedup * 2); - } - if (g_settings.cdrom_seek_speedup != 1) - { - if (g_settings.cdrom_seek_speedup == 0) - { - g_host_interface->AddOSDMessage( - g_host_interface->TranslateStdString("OSDMessage", - "CD-ROM seek speedup set to instant. This may result in instability."), - WARNING_DURATION); - } - else - { - g_host_interface->AddFormattedOSDMessage( - WARNING_DURATION, - g_host_interface->TranslateString("OSDMessage", - "CD-ROM seek speedup set to %ux. This may result in instability."), - g_settings.cdrom_seek_speedup); - } - } - UpdateMemorySaveStateSettings(); return true; } @@ -980,14 +938,6 @@ bool DoState(StateWrapper& sw, HostDisplayTexture** host_texture, bool update_di (cpu_overclock_active && (g_settings.cpu_overclock_numerator != cpu_overclock_numerator || g_settings.cpu_overclock_denominator != cpu_overclock_denominator)))) { - g_host_interface->AddFormattedOSDMessage( - 10.0f, - g_host_interface->TranslateString("OSDMessage", - "WARNING: CPU overclock (%u%%) was different in save state (%u%%)."), - g_settings.cpu_overclock_enable ? g_settings.GetCPUOverclockPercent() : 100u, - cpu_overclock_active ? - Settings::CPUOverclockFractionToPercent(cpu_overclock_numerator, cpu_overclock_denominator) : - 100u); UpdateOverclock(); } @@ -1504,11 +1454,8 @@ static std::unique_ptr GetMemoryCardForSlot(u32 slot, MemoryCardType { if (s_running_game_code.empty()) { - g_host_interface->AddFormattedOSDMessage( - 5.0f, - g_host_interface->TranslateString("System", "Per-game memory card cannot be used for slot %u as the running " - "game has no code. Using shared card instead."), - slot + 1u); + Log_WarningPrintf("Per-game memory card cannot be used for slot %u as the running " + "game has no code. Using shared card instead.", slot + 1u); return MemoryCard::Open(g_host_interface->GetSharedMemoryCardPath(slot)); } else @@ -1521,11 +1468,8 @@ static std::unique_ptr GetMemoryCardForSlot(u32 slot, MemoryCardType { if (s_running_game_title.empty()) { - g_host_interface->AddFormattedOSDMessage( - 5.0f, - g_host_interface->TranslateString("System", "Per-game memory card cannot be used for slot %u as the running " - "game has no title. Using shared card instead."), - slot + 1u); + Log_WarningPrintf("Per-game memory card cannot be used for slot %u as the running " + "game has no title. Using shared card instead.", slot + 1u); return MemoryCard::Open(g_host_interface->GetSharedMemoryCardPath(slot)); } else @@ -1541,11 +1485,8 @@ static std::unique_ptr GetMemoryCardForSlot(u32 slot, MemoryCardType const std::string_view file_title(FileSystem::GetFileTitleFromPath(display_name)); if (file_title.empty()) { - g_host_interface->AddFormattedOSDMessage( - 5.0f, - g_host_interface->TranslateString("System", "Per-game memory card cannot be used for slot %u as the running " - "game has no path. Using shared card instead."), - slot + 1u); + Log_WarningPrintf("Per-game memory card cannot be used for slot %u as the running " + "game has no path. Using shared card instead.", slot + 1u); return MemoryCard::Open(g_host_interface->GetSharedMemoryCardPath(slot)); } else @@ -1673,8 +1614,6 @@ bool InsertMedia(const char* path) if (g_settings.HasAnyPerGameMemoryCards()) { - g_host_interface->AddOSDMessage( - g_host_interface->TranslateStdString("System", "Game changed, reloading memory cards."), 10.0f); UpdatePerGameMemoryCards(); }