diff --git a/android/app/src/cpp/android_host_interface.cpp b/android/app/src/cpp/android_host_interface.cpp index 5be05fc13..5f0de322c 100644 --- a/android/app/src/cpp/android_host_interface.cpp +++ b/android/app/src/cpp/android_host_interface.cpp @@ -5,6 +5,7 @@ #include "common/file_system.h" #include "common/log.h" #include "common/string.h" +#include "common/string_util.h" #include "common/timestamp.h" #include "core/bios.h" #include "core/cheats.h" @@ -162,11 +163,20 @@ void AndroidHostInterface::SetUserDirectory() void AndroidHostInterface::LoadSettings() { - CommonHostInterface::LoadSettings(m_settings_interface); + LoadAndConvertSettings(); CommonHostInterface::FixIncompatibleSettings(false); CommonHostInterface::UpdateInputMap(m_settings_interface); } +void AndroidHostInterface::LoadAndConvertSettings() +{ + CommonHostInterface::LoadSettings(m_settings_interface); + + const std::string msaa_str = m_settings_interface.GetStringValue("GPU", "MSAA", "1"); + g_settings.gpu_multisamples = std::max(StringUtil::FromChars(msaa_str).value_or(1), 1); + g_settings.gpu_per_sample_shading = StringUtil::EndsWith(msaa_str, "-ssaa"); +} + void AndroidHostInterface::UpdateInputMap() { CommonHostInterface::UpdateInputMap(m_settings_interface); @@ -538,7 +548,7 @@ void AndroidHostInterface::RefreshGameList(bool invalidate_cache, bool invalidat void AndroidHostInterface::ApplySettings(bool display_osd_messages) { Settings old_settings = std::move(g_settings); - CommonHostInterface::LoadSettings(m_settings_interface); + LoadAndConvertSettings(); CommonHostInterface::FixIncompatibleSettings(display_osd_messages); // Defer renderer changes, the app really doesn't like it. diff --git a/android/app/src/cpp/android_host_interface.h b/android/app/src/cpp/android_host_interface.h index af23d0557..ff1871d52 100644 --- a/android/app/src/cpp/android_host_interface.h +++ b/android/app/src/cpp/android_host_interface.h @@ -73,6 +73,8 @@ private: void CreateImGuiContext(); void DestroyImGuiContext(); + void LoadAndConvertSettings(); + jobject m_java_object = {}; jobject m_emulation_activity_object = {}; diff --git a/android/app/src/main/res/values/arrays.xml b/android/app/src/main/res/values/arrays.xml index 4f7666826..5b25df342 100644 --- a/android/app/src/main/res/values/arrays.xml +++ b/android/app/src/main/res/values/arrays.xml @@ -245,4 +245,22 @@ Controllers Advanced + + Disabled + 2x MSAA + 4x MSAA + 8x MSAA + 2x SSAA + 4x SSAA + 8x SSAA + + + 1 + 2 + 4 + 8 + 2-ssaa + 4-ssaa + 8-ssaa + diff --git a/android/app/src/main/res/xml/enhancements_preferences.xml b/android/app/src/main/res/xml/enhancements_preferences.xml index 434de8805..a8e72ae00 100644 --- a/android/app/src/main/res/xml/enhancements_preferences.xml +++ b/android/app/src/main/res/xml/enhancements_preferences.xml @@ -39,7 +39,14 @@ app:defaultValue="1" app:useSimpleSummaryProvider="true" app:iconSpaceReserved="false" /> - +