mirror of
https://github.com/libretro/RetroArch
synced 2025-04-16 08:43:10 +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 "../console/rarch_console_settings.h"
|
||||||
#include "../general.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
|
JNIEXPORT void JNICALL Java_com_retroarch_rruntime_load_1game
|
||||||
(JNIEnv *env, jclass class, jstring j_path, jint j_extract_zip_mode)
|
(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.R;
|
||||||
|
|
||||||
|
import com.retroarch.rruntime;
|
||||||
|
|
||||||
import android.app.Activity;
|
import android.app.Activity;
|
||||||
import android.content.Intent;
|
import android.content.Intent;
|
||||||
import android.os.Bundle;
|
import android.os.Bundle;
|
||||||
@ -228,6 +230,8 @@ public class FileChooser extends Activity
|
|||||||
intent.putExtra(FileChooser.PAYLOAD_FILENAME, o.getPath());
|
intent.putExtra(FileChooser.PAYLOAD_FILENAME, o.getPath());
|
||||||
setResult(RESULT_OK, intent);
|
setResult(RESULT_OK, intent);
|
||||||
|
|
||||||
|
rruntime.load_game(o.getName(), 0);
|
||||||
|
|
||||||
finish();
|
finish();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user