mirror of
https://github.com/CTCaer/RetroArch.git
synced 2025-01-29 23:42:14 +00:00
(Android) Need to add JNI_OnLoad and JNI_OnUnLoad in Bifrost
This commit is contained in:
parent
ad7bc1bbe2
commit
c49aa886a1
@ -29,6 +29,17 @@
|
||||
#include "../console/rarch_console_settings.h"
|
||||
#include "../general.h"
|
||||
|
||||
JNIEXPORT jint JNICALL JNI_OnLoad( JavaVM *vm, void *pvt)
|
||||
{
|
||||
fprintf(stdout, "* JNI_OnLoad called\n" );
|
||||
return JNI_VERSION_1_2;
|
||||
}
|
||||
|
||||
JNIEXPORT void JNICALL JNI_OnUnLoad( JavaVM *vm, void *pvt)
|
||||
{
|
||||
fprintf(stdout, "* JNI_OnUnLoad called\n" );
|
||||
}
|
||||
|
||||
JNIEXPORT void JNICALL Java_com_retroarch_rruntime_load_1game
|
||||
(JNIEnv *env, jclass class, jstring j_path, jint j_extract_zip_mode)
|
||||
{
|
||||
|
@ -8,6 +8,8 @@ import java.util.Stack;
|
||||
|
||||
import com.retroarch.R;
|
||||
|
||||
import com.retroarch.rruntime;
|
||||
|
||||
import android.app.Activity;
|
||||
import android.content.Intent;
|
||||
import android.os.Bundle;
|
||||
@ -228,6 +230,8 @@ public class FileChooser extends Activity
|
||||
intent.putExtra(FileChooser.PAYLOAD_FILENAME, o.getPath());
|
||||
setResult(RESULT_OK, intent);
|
||||
|
||||
rruntime.load_game(o.getName(), 0);
|
||||
|
||||
finish();
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user