diff --git a/android/app/src/cpp/android_host_interface.cpp b/android/app/src/cpp/android_host_interface.cpp index 7235e2dc4..d13d6c205 100644 --- a/android/app/src/cpp/android_host_interface.cpp +++ b/android/app/src/cpp/android_host_interface.cpp @@ -132,6 +132,7 @@ void AndroidHostInterface::SetUserDirectory() void AndroidHostInterface::LoadSettings() { CommonHostInterface::LoadSettings(m_settings_interface); + CommonHostInterface::FixIncompatibleSettings(false); CommonHostInterface::UpdateInputMap(m_settings_interface); } diff --git a/src/core/host_interface.cpp b/src/core/host_interface.cpp index e7f345ca0..8495212ae 100644 --- a/src/core/host_interface.cpp +++ b/src/core/host_interface.cpp @@ -441,22 +441,22 @@ void HostInterface::SetDefaultSettings(SettingsInterface& si) void HostInterface::LoadSettings(SettingsInterface& si) { g_settings.Load(si); - - FixIncompatibleSettings(); } -void HostInterface::FixIncompatibleSettings() +void HostInterface::FixIncompatibleSettings(bool display_osd_messages) { if (g_settings.gpu_pgxp_enable) { if (g_settings.gpu_renderer == GPURenderer::Software) { - Log_WarningPrintf("PGXP enabled with software renderer, disabling"); + if (display_osd_messages) + AddOSDMessage("PGXP is incompatible with the software renderer, disabling PGXP.", 10.0f); g_settings.gpu_pgxp_enable = false; } else if (g_settings.gpu_pgxp_cpu && g_settings.cpu_execution_mode == CPUExecutionMode::Recompiler) { - Log_WarningPrintf("Recompiler selected with PGXP CPU mode, falling back to cached interpreter"); + if (display_osd_messages) + AddOSDMessage("PGXP CPU mode is incompatible with the recompiler, using Cached Interpreter instead.", 10.0f); g_settings.cpu_execution_mode = CPUExecutionMode::CachedInterpreter; } } diff --git a/src/core/host_interface.h b/src/core/host_interface.h index 3999cf355..da9071226 100644 --- a/src/core/host_interface.h +++ b/src/core/host_interface.h @@ -135,7 +135,7 @@ protected: virtual void SaveSettings(SettingsInterface& si); /// Checks and fixes up any incompatible settings. - virtual void FixIncompatibleSettings(); + virtual void FixIncompatibleSettings(bool display_osd_messages); /// Checks for settings changes, std::move() the old settings away for comparing beforehand. virtual void CheckForSettingsChanges(const Settings& old_settings); diff --git a/src/duckstation-libretro/libretro_host_interface.cpp b/src/duckstation-libretro/libretro_host_interface.cpp index e193770e8..52292824c 100644 --- a/src/duckstation-libretro/libretro_host_interface.cpp +++ b/src/duckstation-libretro/libretro_host_interface.cpp @@ -101,6 +101,7 @@ bool LibretroHostInterface::Initialize() return false; LoadSettings(); + FixIncompatibleSettings(); UpdateLogging(); return true; } @@ -631,6 +632,7 @@ void LibretroHostInterface::UpdateSettings() { Settings old_settings(std::move(g_settings)); LoadSettings(); + FixIncompatibleSettings(); if (g_settings.gpu_resolution_scale != old_settings.gpu_resolution_scale && g_settings.gpu_renderer != GPURenderer::Software) diff --git a/src/duckstation-qt/qthostinterface.cpp b/src/duckstation-qt/qthostinterface.cpp index fbfed9411..882a6c9e3 100644 --- a/src/duckstation-qt/qthostinterface.cpp +++ b/src/duckstation-qt/qthostinterface.cpp @@ -281,6 +281,7 @@ void QtHostInterface::setDefaultSettings() CommonHostInterface::LoadSettings(*m_settings_interface.get()); CommonHostInterface::ApplyGameSettings(false); + CommonHostInterface::FixIncompatibleSettings(false); } CheckForSettingsChanges(old_settings); @@ -299,6 +300,7 @@ void QtHostInterface::applySettings(bool display_osd_messages /* = false */) std::lock_guard guard(m_settings_mutex); CommonHostInterface::LoadSettings(*m_settings_interface.get()); CommonHostInterface::ApplyGameSettings(display_osd_messages); + CommonHostInterface::FixIncompatibleSettings(display_osd_messages); } CheckForSettingsChanges(old_settings); @@ -676,6 +678,7 @@ void QtHostInterface::LoadSettings() CommonHostInterface::CheckSettings(*m_settings_interface.get()); CommonHostInterface::LoadSettings(*m_settings_interface.get()); + CommonHostInterface::FixIncompatibleSettings(false); } void QtHostInterface::SetDefaultSettings(SettingsInterface& si) diff --git a/src/duckstation-sdl/sdl_host_interface.cpp b/src/duckstation-sdl/sdl_host_interface.cpp index 061e0abbb..b4d6bd393 100644 --- a/src/duckstation-sdl/sdl_host_interface.cpp +++ b/src/duckstation-sdl/sdl_host_interface.cpp @@ -324,6 +324,7 @@ void SDLHostInterface::OnRunningGameChanged() Settings old_settings(std::move(g_settings)); CommonHostInterface::LoadSettings(*m_settings_interface.get()); CommonHostInterface::ApplyGameSettings(true); + CommonHostInterface::FixIncompatibleSettings(true); CheckForSettingsChanges(old_settings); if (!System::GetRunningTitle().empty()) @@ -353,6 +354,7 @@ void SDLHostInterface::SaveAndUpdateSettings() Settings old_settings(std::move(g_settings)); CommonHostInterface::LoadSettings(*m_settings_interface.get()); CommonHostInterface::ApplyGameSettings(false); + CommonHostInterface::FixIncompatibleSettings(false); CheckForSettingsChanges(old_settings); m_settings_interface->Save(); @@ -462,6 +464,7 @@ void SDLHostInterface::LoadSettings() m_settings_interface = std::make_unique(GetSettingsFileName()); m_settings_copy.Load(*m_settings_interface); CommonHostInterface::LoadSettings(*m_settings_interface.get()); + CommonHostInterface::FixIncompatibleSettings(false); } void SDLHostInterface::ReportError(const char* message)