diff --git a/android/bifrost.c b/android/bifrost.c index 99217bbb7e..5effa16725 100644 --- a/android/bifrost.c +++ b/android/bifrost.c @@ -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) { diff --git a/android/src/com/retroarch/fileio/FileChooser.java b/android/src/com/retroarch/fileio/FileChooser.java index 96f8c43c74..91dff1246b 100644 --- a/android/src/com/retroarch/fileio/FileChooser.java +++ b/android/src/com/retroarch/fileio/FileChooser.java @@ -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(); }