From 80a377d45a6fcc6718a9d78083609f04a76831c6 Mon Sep 17 00:00:00 2001 From: Connor McLaughlin Date: Tue, 27 Oct 2020 11:58:01 +1000 Subject: [PATCH] Android: Defer renderer changes to restart Apparently it doesn't like changing surface types. --- android/app/src/cpp/android_host_interface.cpp | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/android/app/src/cpp/android_host_interface.cpp b/android/app/src/cpp/android_host_interface.cpp index f626afb8c..b3d5598b1 100644 --- a/android/app/src/cpp/android_host_interface.cpp +++ b/android/app/src/cpp/android_host_interface.cpp @@ -534,6 +534,16 @@ void AndroidHostInterface::ApplySettings(bool display_osd_messages) Settings old_settings = std::move(g_settings); CommonHostInterface::LoadSettings(m_settings_interface); CommonHostInterface::FixIncompatibleSettings(display_osd_messages); + + // Defer renderer changes, the app really doesn't like it. + if (System::IsValid() && g_settings.gpu_renderer != old_settings.gpu_renderer) + { + AddFormattedOSDMessage(5.0f, + TranslateString("OSDMessage", "Change to %s GPU renderer will take effect on restart."), + Settings::GetRendererName(g_settings.gpu_renderer)); + g_settings.gpu_renderer = old_settings.gpu_renderer; + } + CheckForSettingsChanges(old_settings); }