Android: Convert ARCheat to Kotlin

This commit is contained in:
Charles Lombardo
2023-03-01 13:32:42 -05:00
parent 211be4698f
commit 408b6cb50c
4 changed files with 54 additions and 62 deletions

View File

@ -500,7 +500,7 @@ JNIEXPORT jint JNI_OnLoad(JavaVM* vm, void* reserved)
const jclass ar_cheat_class =
env->FindClass("org/dolphinemu/dolphinemu/features/cheats/model/ARCheat");
s_ar_cheat_class = reinterpret_cast<jclass>(env->NewGlobalRef(ar_cheat_class));
s_ar_cheat_pointer = env->GetFieldID(ar_cheat_class, "mPointer", "J");
s_ar_cheat_pointer = env->GetFieldID(ar_cheat_class, "pointer", "J");
s_ar_cheat_constructor = env->GetMethodID(ar_cheat_class, "<init>", "(J)V");
env->DeleteLocalRef(ar_cheat_class);

View File

@ -81,7 +81,7 @@ Java_org_dolphinemu_dolphinemu_features_cheats_model_ARCheat_getEnabled(JNIEnv*
return static_cast<jboolean>(GetPointer(env, obj)->enabled);
}
JNIEXPORT jint JNICALL Java_org_dolphinemu_dolphinemu_features_cheats_model_ARCheat_trySetImpl(
JNIEXPORT jint JNICALL Java_org_dolphinemu_dolphinemu_features_cheats_model_ARCheat_setCheatImpl(
JNIEnv* env, jobject obj, jstring name, jstring creator, jstring notes, jstring code_string)
{
ActionReplay::ARCode* code = GetPointer(env, obj);