mirror of
https://github.com/libretro/RetroArch
synced 2025-02-04 03:40:03 +00:00
[ANDROID] pass phone version to activity
This commit is contained in:
parent
61b42c82e2
commit
d1b9015aef
@ -34,6 +34,7 @@ struct droid
|
|||||||
unsigned width;
|
unsigned width;
|
||||||
unsigned height;
|
unsigned height;
|
||||||
struct saved_state state;
|
struct saved_state state;
|
||||||
|
int version;
|
||||||
};
|
};
|
||||||
|
|
||||||
extern struct droid g_android;
|
extern struct droid g_android;
|
||||||
|
@ -283,11 +283,15 @@ static void* android_app_entry(void* param)
|
|||||||
|
|
||||||
char rom_path[512];
|
char rom_path[512];
|
||||||
char libretro_path[512];
|
char libretro_path[512];
|
||||||
|
char android_version[16];
|
||||||
|
|
||||||
// Get arguments */
|
// Get arguments */
|
||||||
android_get_char_argv(rom_path, sizeof(rom_path), "ROM");
|
android_get_char_argv(rom_path, sizeof(rom_path), "ROM");
|
||||||
android_get_char_argv(libretro_path, sizeof(libretro_path), "LIBRETRO");
|
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("Checking arguments passed...\n");
|
||||||
RARCH_LOG("ROM Filename: [%s].\n", rom_path);
|
RARCH_LOG("ROM Filename: [%s].\n", rom_path);
|
||||||
RARCH_LOG("Libretro path: [%s].\n", libretro_path);
|
RARCH_LOG("Libretro path: [%s].\n", libretro_path);
|
||||||
|
@ -91,6 +91,7 @@ public class phoenix extends Activity
|
|||||||
myIntent = new Intent(this, NativeActivity.class);
|
myIntent = new Intent(this, NativeActivity.class);
|
||||||
myIntent.putExtra("ROM", data.getStringExtra("PATH"));
|
myIntent.putExtra("ROM", data.getStringExtra("PATH"));
|
||||||
myIntent.putExtra("LIBRETRO", libretro_path);
|
myIntent.putExtra("LIBRETRO", libretro_path);
|
||||||
|
myIntent.putExtra("ANDROIDVER", Integer.toString(android.os.Build.VERSION.SDK_INT));
|
||||||
startActivity(myIntent);
|
startActivity(myIntent);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
Loading…
x
Reference in New Issue
Block a user