diff options
| author | JosJuice <josjuice@gmail.com> | 2023-03-11 17:48:42 +0100 |
|---|---|---|
| committer | JosJuice <josjuice@gmail.com> | 2023-03-11 17:51:59 +0100 |
| commit | 68fd133057edc70fccf91c6757c5f1d929cc5ab0 (patch) | |
| tree | a2f38ce5a0d26e87173935129b4c8095c2b8fd04 /Source/Android/jni/Config/NativeConfig.cpp | |
| parent | 53e7090f5559106875ee5d1170a641439df66379 (diff) | |
Android: Remove support for the old config system
All settings that we care about from an Android perspective are now
supported by the new config system, so we can remove all the Android code
for the old config system. This should have no impact on users.
Diffstat (limited to 'Source/Android/jni/Config/NativeConfig.cpp')
| -rw-r--r-- | Source/Android/jni/Config/NativeConfig.cpp | 22 |
1 files changed, 17 insertions, 5 deletions
diff --git a/Source/Android/jni/Config/NativeConfig.cpp b/Source/Android/jni/Config/NativeConfig.cpp index 3c67eb3af4..9681f0ca8e 100644 --- a/Source/Android/jni/Config/NativeConfig.cpp +++ b/Source/Android/jni/Config/NativeConfig.cpp @@ -138,12 +138,14 @@ 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) { - 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 GetLayer(layer, {})->Save(); +} - return layer_ptr->Save(); +JNIEXPORT void JNICALL +Java_org_dolphinemu_dolphinemu_features_settings_model_NativeConfig_deleteAllKeys(JNIEnv*, jclass, + jint layer) +{ + return GetLayer(layer, {})->DeleteAllKeys(); } JNIEXPORT jboolean JNICALL @@ -166,6 +168,16 @@ Java_org_dolphinemu_dolphinemu_features_settings_model_NativeConfig_deleteKey( return static_cast<jboolean>(had_value); } +JNIEXPORT jboolean JNICALL +Java_org_dolphinemu_dolphinemu_features_settings_model_NativeConfig_exists(JNIEnv* env, jclass, + jint layer, jstring file, + jstring section, + jstring key) +{ + const Config::Location location = GetLocation(env, file, section, key); + return static_cast<jboolean>(GetLayer(layer, location)->Exists(location)); +} + JNIEXPORT jstring JNICALL Java_org_dolphinemu_dolphinemu_features_settings_model_NativeConfig_getString( JNIEnv* env, jclass, jint layer, jstring file, jstring section, jstring key, |
