mirror of
https://github.com/libretro/RetroArch.git
synced 2024-11-24 08:30:16 +00:00
Send APK path as param too
This commit is contained in:
parent
b6760e27fb
commit
a59fd029b1
@ -193,7 +193,8 @@ public final class MainMenuFragment extends PreferenceListFragment implements On
|
||||
prefs.getString("libretro_path", ctx.getApplicationInfo().dataDir + "/cores/"),
|
||||
UserPreferences.getDefaultConfigPath(ctx),
|
||||
Settings.Secure.getString(ctx.getContentResolver(), Settings.Secure.DEFAULT_INPUT_METHOD),
|
||||
ctx.getApplicationInfo().dataDir);
|
||||
ctx.getApplicationInfo().dataDir,
|
||||
ctx.getApplicationInfo().sourceDir);
|
||||
startActivity(retro);
|
||||
}
|
||||
// Quit RetroArch preference
|
||||
@ -208,7 +209,7 @@ public final class MainMenuFragment extends PreferenceListFragment implements On
|
||||
}
|
||||
|
||||
public static void startRetroActivity(Intent retro, String contentPath, String corePath,
|
||||
String configFilePath, String imePath, String dataDirPath)
|
||||
String configFilePath, String imePath, String dataDirPath, String dataSourcePath)
|
||||
{
|
||||
if (contentPath != null) {
|
||||
retro.putExtra("ROM", contentPath);
|
||||
@ -217,6 +218,7 @@ public final class MainMenuFragment extends PreferenceListFragment implements On
|
||||
retro.putExtra("CONFIGFILE", configFilePath);
|
||||
retro.putExtra("IME", imePath);
|
||||
retro.putExtra("DATADIR", dataDirPath);
|
||||
retro.putExtra("APK", dataSourcePath);
|
||||
retro.putExtra("SDCARD", Environment.getExternalStorageDirectory().getAbsolutePath());
|
||||
retro.putExtra("DOWNLOADS", Environment.getExternalStoragePublicDirectory(Environment.DIRECTORY_DOWNLOADS).getAbsolutePath());
|
||||
retro.putExtra("SCREENSHOTS", Environment.getExternalStoragePublicDirectory(Environment.DIRECTORY_PICTURES).getAbsolutePath());
|
||||
|
@ -439,6 +439,7 @@ static bool device_is_game_console(const char *name)
|
||||
|
||||
static char screenshot_dir[PATH_MAX_LENGTH];
|
||||
static char downloads_dir[PATH_MAX_LENGTH];
|
||||
static char apk_path[PATH_MAX_LENGTH];
|
||||
static char sdcard_dir[PATH_MAX_LENGTH];
|
||||
static char app_dir[PATH_MAX_LENGTH];
|
||||
|
||||
@ -590,7 +591,7 @@ static void frontend_android_get_environment_settings(int *argc,
|
||||
if (*sdcard_dir)
|
||||
{
|
||||
RARCH_LOG("External Storage Location %s.\n", sdcard_dir);
|
||||
//todo base dir handler
|
||||
/* TODO base dir handler */
|
||||
}
|
||||
}
|
||||
|
||||
@ -612,7 +613,7 @@ static void frontend_android_get_environment_settings(int *argc,
|
||||
if (*screenshot_dir)
|
||||
{
|
||||
RARCH_LOG("Screenshot Directory [%s]s.\n", screenshot_dir);
|
||||
//todo screenshot handler
|
||||
/* TODO: screenshot handler */
|
||||
}
|
||||
}
|
||||
|
||||
@ -634,7 +635,27 @@ static void frontend_android_get_environment_settings(int *argc,
|
||||
if (*downloads_dir)
|
||||
{
|
||||
RARCH_LOG("Download Directory [%s].\n", downloads_dir);
|
||||
//todo downloads handler
|
||||
/* TODO: downloads handler */
|
||||
}
|
||||
}
|
||||
|
||||
CALL_OBJ_METHOD_PARAM(env, jstr, obj, android_app->getStringExtra,
|
||||
(*env)->NewStringUTF(env, "APK"));
|
||||
|
||||
if (android_app->getStringExtra && jstr)
|
||||
{
|
||||
const char *argv = NULL;
|
||||
|
||||
*apk_path = '\0';
|
||||
argv = (*env)->GetStringUTFChars(env, jstr, 0);
|
||||
|
||||
if (argv && *argv)
|
||||
strlcpy(apk_path, argv, sizeof(apk_path));
|
||||
(*env)->ReleaseStringUTFChars(env, jstr, argv);
|
||||
|
||||
if (*apk_path)
|
||||
{
|
||||
RARCH_LOG("APK Path [%s].\n", apk_path);
|
||||
}
|
||||
}
|
||||
|
||||
@ -720,7 +741,7 @@ static void frontend_android_get_environment_settings(int *argc,
|
||||
|
||||
g_defaults.settings.video_threaded_enable = true;
|
||||
|
||||
// Set automatic default values per device
|
||||
/* Set automatic default values per device */
|
||||
if (device_is_xperia_play(device_model))
|
||||
{
|
||||
g_defaults.settings.out_latency = 128;
|
||||
|
Loading…
Reference in New Issue
Block a user