mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-06-13 00:58:29 +02:00
Android: Hook up game settings to the new config system
This commit is contained in:
@ -9,6 +9,7 @@
|
||||
|
||||
#include "Common/Assert.h"
|
||||
#include "Common/Config/Config.h"
|
||||
#include "Core/ConfigLoaders/GameConfigLoader.h"
|
||||
#include "Core/ConfigLoaders/IsSettingSaveable.h"
|
||||
#include "jni/AndroidCommon/AndroidCommon.h"
|
||||
|
||||
@ -85,6 +86,26 @@ Java_org_dolphinemu_dolphinemu_features_settings_model_NativeConfig_isSettingSav
|
||||
return static_cast<jboolean>(ConfigLoaders::IsSettingSaveable(location));
|
||||
}
|
||||
|
||||
JNIEXPORT void JNICALL
|
||||
Java_org_dolphinemu_dolphinemu_features_settings_model_NativeConfig_loadGameInis(JNIEnv* env,
|
||||
jclass obj,
|
||||
jstring jGameId,
|
||||
jint jRevision)
|
||||
{
|
||||
const std::string game_id = GetJString(env, jGameId);
|
||||
const u16 revision = static_cast<u16>(jRevision);
|
||||
Config::AddLayer(ConfigLoaders::GenerateGlobalGameConfigLoader(game_id, revision));
|
||||
Config::AddLayer(ConfigLoaders::GenerateLocalGameConfigLoader(game_id, revision));
|
||||
}
|
||||
|
||||
JNIEXPORT void JNICALL
|
||||
Java_org_dolphinemu_dolphinemu_features_settings_model_NativeConfig_unloadGameInis(JNIEnv* env,
|
||||
jclass obj)
|
||||
{
|
||||
Config::RemoveLayer(Config::LayerType::GlobalGame);
|
||||
Config::RemoveLayer(Config::LayerType::LocalGame);
|
||||
}
|
||||
|
||||
JNIEXPORT void JNICALL Java_org_dolphinemu_dolphinemu_features_settings_model_NativeConfig_save(
|
||||
JNIEnv* env, jclass obj, jint layer)
|
||||
{
|
||||
|
Reference in New Issue
Block a user