[ANDROID] pass phone version to activity

This commit is contained in:
Toad King 2012-11-30 20:54:29 -05:00
parent 61b42c82e2
commit d1b9015aef
3 changed files with 6 additions and 0 deletions

View File

@ -34,6 +34,7 @@ struct droid
unsigned width;
unsigned height;
struct saved_state state;
int version;
};
extern struct droid g_android;

View File

@ -283,11 +283,15 @@ static void* android_app_entry(void* param)
char rom_path[512];
char libretro_path[512];
char android_version[16];
// Get arguments */
android_get_char_argv(rom_path, sizeof(rom_path), "ROM");
android_get_char_argv(libretro_path, sizeof(libretro_path), "LIBRETRO");
android_get_char_argv(android_version, sizeof(android_version), "ANDROIDVER");
g_android.version = atoi(android_version);
RARCH_LOG("Android version: %d\n", g_android.version);
RARCH_LOG("Checking arguments passed...\n");
RARCH_LOG("ROM Filename: [%s].\n", rom_path);
RARCH_LOG("Libretro path: [%s].\n", libretro_path);

View File

@ -91,6 +91,7 @@ public class phoenix extends Activity
myIntent = new Intent(this, NativeActivity.class);
myIntent.putExtra("ROM", data.getStringExtra("PATH"));
myIntent.putExtra("LIBRETRO", libretro_path);
myIntent.putExtra("ANDROIDVER", Integer.toString(android.os.Build.VERSION.SDK_INT));
startActivity(myIntent);
}
else