(Android) Need to add JNI_OnLoad and JNI_OnUnLoad in Bifrost

This commit is contained in:
twinaphex 2012-10-03 06:11:33 +02:00
parent ad7bc1bbe2
commit c49aa886a1
2 changed files with 15 additions and 0 deletions

View File

@ -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)
{

View File

@ -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();
}