Android: Convert GraphicsModGroup to Kotlin
This commit is contained in:
parent
9cbe66bce4
commit
5f6995fe6c
|
@ -1,27 +0,0 @@
|
|||
package org.dolphinemu.dolphinemu.features.cheats.model;
|
||||
|
||||
import androidx.annotation.Keep;
|
||||
import androidx.annotation.NonNull;
|
||||
|
||||
public class GraphicsModGroup
|
||||
{
|
||||
@Keep
|
||||
private final long mPointer;
|
||||
|
||||
@Keep
|
||||
private GraphicsModGroup(long pointer)
|
||||
{
|
||||
mPointer = pointer;
|
||||
}
|
||||
|
||||
@Override
|
||||
public native void finalize();
|
||||
|
||||
@NonNull
|
||||
public native GraphicsMod[] getMods();
|
||||
|
||||
public native void save();
|
||||
|
||||
@NonNull
|
||||
public static native GraphicsModGroup load(String gameId);
|
||||
}
|
|
@ -0,0 +1,17 @@
|
|||
package org.dolphinemu.dolphinemu.features.cheats.model
|
||||
|
||||
import androidx.annotation.Keep
|
||||
|
||||
class GraphicsModGroup @Keep private constructor(@field:Keep private val pointer: Long) {
|
||||
external fun finalize()
|
||||
|
||||
val mods: Array<GraphicsMod>
|
||||
external get
|
||||
|
||||
external fun save()
|
||||
|
||||
companion object {
|
||||
@JvmStatic
|
||||
external fun load(gameId: String): GraphicsModGroup
|
||||
}
|
||||
}
|
|
@ -522,7 +522,7 @@ JNIEXPORT jint JNI_OnLoad(JavaVM* vm, void* reserved)
|
|||
env->FindClass("org/dolphinemu/dolphinemu/features/cheats/model/GraphicsModGroup");
|
||||
s_graphics_mod_group_class =
|
||||
reinterpret_cast<jclass>(env->NewGlobalRef(graphics_mod_group_class));
|
||||
s_graphics_mod_group_pointer = env->GetFieldID(graphics_mod_group_class, "mPointer", "J");
|
||||
s_graphics_mod_group_pointer = env->GetFieldID(graphics_mod_group_class, "pointer", "J");
|
||||
s_graphics_mod_group_constructor = env->GetMethodID(graphics_mod_group_class, "<init>", "(J)V");
|
||||
env->DeleteLocalRef(graphics_mod_group_class);
|
||||
|
||||
|
|
Loading…
Reference in New Issue