Skip to content
Permalink
Browse files
Merge pull request #9454 from JosJuice/android-ingame-settings-save
Android: Fix in-game settings changes not getting saved
  • Loading branch information
leoetlino committed Jan 27, 2021
2 parents b886c70 + 5978550 commit 70447d0
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
@@ -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<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
@@ -138,6 +138,8 @@ class Layer
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;

0 comments on commit 70447d0

Please sign in to comment.