mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-02-03 19:41:45 +02:00
Merge pull request #9717 from JosJuice/android-issettingsaveable
Fix Android controller mappings accidentally being in IsSettingSaveable
This commit is contained in:
commit
eae6d91f34
@ -26,12 +26,25 @@ bool IsSettingSaveable(const Config::Location& config_location)
|
|||||||
|
|
||||||
if (config_location.system == Config::System::Main)
|
if (config_location.system == Config::System::Main)
|
||||||
{
|
{
|
||||||
for (const std::string& section : {"NetPlay", "General", "Display", "Network", "Analytics",
|
for (const std::string& section :
|
||||||
"AndroidOverlayButtons", "Android"})
|
{"NetPlay", "General", "Display", "Network", "Analytics", "AndroidOverlayButtons"})
|
||||||
{
|
{
|
||||||
if (config_location.section == section)
|
if (config_location.section == section)
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Android controller mappings are not saveable, other Android settings are.
|
||||||
|
// TODO: Kill the current Android controller mappings system
|
||||||
|
if (config_location.section == "Android")
|
||||||
|
{
|
||||||
|
static constexpr std::array<const char*, 8> android_setting_saveable = {
|
||||||
|
"ControlScale", "ControlOpacity", "EmulationOrientation", "JoystickRelCenter",
|
||||||
|
"LastPlatformTab", "MotionControls", "PhoneRumble", "ShowInputOverlay"};
|
||||||
|
|
||||||
|
return std::any_of(
|
||||||
|
android_setting_saveable.cbegin(), android_setting_saveable.cend(),
|
||||||
|
[&config_location](const char* key) { return key == config_location.key; });
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
static constexpr std::array<const Config::Location*, 17> s_setting_saveable = {
|
static constexpr std::array<const Config::Location*, 17> s_setting_saveable = {
|
||||||
|
Loading…
Reference in New Issue
Block a user