diff --git a/Source/Android/jni/NativeConfig.cpp b/Source/Android/jni/NativeConfig.cpp index 14d7d4af3e..270a999d0c 100644 --- a/Source/Android/jni/NativeConfig.cpp +++ b/Source/Android/jni/NativeConfig.cpp @@ -128,7 +128,12 @@ Java_org_dolphinemu_dolphinemu_features_settings_model_NativeConfig_unloadGameIn JNIEXPORT void JNICALL Java_org_dolphinemu_dolphinemu_features_settings_model_NativeConfig_save( JNIEnv*, jclass, jint layer) { - return GetLayer(layer, {})->Save(); + const std::shared_ptr layer_ptr = GetLayer(layer, {}); + + // Workaround for the Settings class carrying around a legacy map of settings it always saves + layer_ptr->MarkAsDirty(); + + return layer_ptr->Save(); } JNIEXPORT jboolean JNICALL diff --git a/Source/Core/Common/Config/Layer.h b/Source/Core/Common/Config/Layer.h index cbfbbe6aae..5c4185cdfe 100644 --- a/Source/Core/Common/Config/Layer.h +++ b/Source/Core/Common/Config/Layer.h @@ -138,6 +138,8 @@ public: m_map.insert_or_assign(location, std::move(new_value)); } + void MarkAsDirty() { m_is_dirty = true; } + Section GetSection(System system, const std::string& section); ConstSection GetSection(System system, const std::string& section) const;