Merge pull request #9454 from JosJuice/android-ingame-settings-save
Android: Fix in-game settings changes not getting saved
This commit is contained in:
commit
70447d0281
|
@ -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(
|
JNIEXPORT void JNICALL Java_org_dolphinemu_dolphinemu_features_settings_model_NativeConfig_save(
|
||||||
JNIEnv*, jclass, jint layer)
|
JNIEnv*, jclass, jint layer)
|
||||||
{
|
{
|
||||||
return GetLayer(layer, {})->Save();
|
const std::shared_ptr<Config::Layer> 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
|
JNIEXPORT jboolean JNICALL
|
||||||
|
|
|
@ -138,6 +138,8 @@ public:
|
||||||
m_map.insert_or_assign(location, std::move(new_value));
|
m_map.insert_or_assign(location, std::move(new_value));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void MarkAsDirty() { m_is_dirty = true; }
|
||||||
|
|
||||||
Section GetSection(System system, const std::string& section);
|
Section GetSection(System system, const std::string& section);
|
||||||
ConstSection GetSection(System system, const std::string& section) const;
|
ConstSection GetSection(System system, const std::string& section) const;
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue