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.
This commit is contained in:
JosJuice
2023-03-11 17:48:42 +01:00
parent 53e7090f55
commit 68fd133057
9 changed files with 95 additions and 194 deletions

View File

@ -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, {});
return GetLayer(layer, {})->Save();
}
// Workaround for the Settings class carrying around a legacy map of settings it always saves
layer_ptr->MarkAsDirty();
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,