From 2c1980b7b0186a30f76e5b96e97f2eb384de9fa9 Mon Sep 17 00:00:00 2001 From: twinaphex Date: Fri, 5 Oct 2012 19:02:32 +0200 Subject: [PATCH] (Android) Seems to run frames now - now to get video/sound --- android/bifrost.c | 6 ++++++ android/src/com/retroarch/main.java | 1 + 2 files changed, 7 insertions(+) diff --git a/android/bifrost.c b/android/bifrost.c index ba9d0629ce..8645006652 100644 --- a/android/bifrost.c +++ b/android/bifrost.c @@ -104,9 +104,13 @@ JNIEXPORT void JNICALL Java_com_retroarch_rruntime_load_1game (*env)->ReleaseStringUTFChars(env, j_path, game_path); } +static int counter = 0; + JNIEXPORT jboolean JNICALL Java_com_retroarch_rruntime_run_1frame (JNIEnv *env, jclass class) { + counter++; + RARCH_LOG("counter: %d.\n", counter); return rarch_main_iterate(); } @@ -121,6 +125,8 @@ JNIEXPORT void JNICALL Java_com_retroarch_rruntime_startup retval = rarch_startup(config_path); + rarch_init_msg_queue(); + (*env)->ReleaseStringUTFChars(env, j_config_path, config_path); } diff --git a/android/src/com/retroarch/main.java b/android/src/com/retroarch/main.java index 9fe3c917c9..5f55c62091 100644 --- a/android/src/com/retroarch/main.java +++ b/android/src/com/retroarch/main.java @@ -84,6 +84,7 @@ public class main extends Activity + R.raw.retroarch); rruntime.startup(video.toString()); + while(rruntime.run_frame()); } }