|
|
|
@ -26,6 +26,9 @@ static jmethodID s_disk_cache_load_progress; |
|
|
|
static jmethodID s_on_emulation_started; |
|
|
|
static jmethodID s_on_emulation_stopped; |
|
|
|
static jmethodID s_on_program_changed; |
|
|
|
static jmethodID s_copy_to_storage; |
|
|
|
static jmethodID s_file_exists; |
|
|
|
static jmethodID s_file_extension; |
|
|
|
|
|
|
|
static jclass s_game_class; |
|
|
|
static jmethodID s_game_constructor; |
|
|
|
@ -149,6 +152,18 @@ jmethodID GetDiskCacheLoadProgress() { |
|
|
|
return s_disk_cache_load_progress; |
|
|
|
} |
|
|
|
|
|
|
|
jmethodID GetCopyToStorage() { |
|
|
|
return s_copy_to_storage; |
|
|
|
} |
|
|
|
|
|
|
|
jmethodID GetFileExists() { |
|
|
|
return s_file_exists; |
|
|
|
} |
|
|
|
|
|
|
|
jmethodID GetFileExtension() { |
|
|
|
return s_file_extension; |
|
|
|
} |
|
|
|
|
|
|
|
jmethodID GetOnEmulationStarted() { |
|
|
|
return s_on_emulation_started; |
|
|
|
} |
|
|
|
@ -426,7 +441,8 @@ jint JNI_OnLoad(JavaVM* vm, void* reserved) { |
|
|
|
|
|
|
|
const jclass game_dir_class = env->FindClass("org/yuzu/yuzu_emu/model/GameDir"); |
|
|
|
s_game_dir_class = reinterpret_cast<jclass>(env->NewGlobalRef(game_dir_class)); |
|
|
|
s_game_dir_constructor = env->GetMethodID(game_dir_class, "<init>", "(Ljava/lang/String;Z)V"); |
|
|
|
s_game_dir_constructor = env->GetMethodID(game_dir_class, "<init>", |
|
|
|
"(Ljava/lang/String;Z)V"); |
|
|
|
env->DeleteLocalRef(game_dir_class); |
|
|
|
|
|
|
|
// Initialize methods
|
|
|
|
@ -434,6 +450,12 @@ jint JNI_OnLoad(JavaVM* vm, void* reserved) { |
|
|
|
env->GetStaticMethodID(s_native_library_class, "exitEmulationActivity", "(I)V"); |
|
|
|
s_disk_cache_load_progress = |
|
|
|
env->GetStaticMethodID(s_disk_cache_progress_class, "loadProgress", "(III)V"); |
|
|
|
s_copy_to_storage = env->GetStaticMethodID(s_native_library_class, "copyFileToStorage", |
|
|
|
"(Ljava/lang/String;Ljava/lang/String;)Z"); |
|
|
|
s_file_exists = env->GetStaticMethodID(s_native_library_class, "exists", |
|
|
|
"(Ljava/lang/String;)Z"); |
|
|
|
s_file_extension = env->GetStaticMethodID(s_native_library_class, "getFileExtension", |
|
|
|
"(Ljava/lang/String;)Ljava/lang/String;"); |
|
|
|
s_on_emulation_started = |
|
|
|
env->GetStaticMethodID(s_native_library_class, "onEmulationStarted", "()V"); |
|
|
|
s_on_emulation_stopped = |
|
|
|
@ -555,10 +577,12 @@ jint JNI_OnLoad(JavaVM* vm, void* reserved) { |
|
|
|
env->GetMethodID(yuzu_input_device_interface, "getName", "()Ljava/lang/String;"); |
|
|
|
s_yuzu_input_device_get_guid = |
|
|
|
env->GetMethodID(yuzu_input_device_interface, "getGUID", "()Ljava/lang/String;"); |
|
|
|
s_yuzu_input_device_get_port = env->GetMethodID(yuzu_input_device_interface, "getPort", "()I"); |
|
|
|
s_yuzu_input_device_get_port = env->GetMethodID(yuzu_input_device_interface, "getPort", |
|
|
|
"()I"); |
|
|
|
s_yuzu_input_device_get_supports_vibration = |
|
|
|
env->GetMethodID(yuzu_input_device_interface, "getSupportsVibration", "()Z"); |
|
|
|
s_yuzu_input_device_vibrate = env->GetMethodID(yuzu_input_device_interface, "vibrate", "(F)V"); |
|
|
|
s_yuzu_input_device_vibrate = env->GetMethodID(yuzu_input_device_interface, "vibrate", |
|
|
|
"(F)V"); |
|
|
|
s_yuzu_input_device_get_axes = |
|
|
|
env->GetMethodID(yuzu_input_device_interface, "getAxes", "()[Ljava/lang/Integer;"); |
|
|
|
s_yuzu_input_device_has_keys = |
|
|
|
|