add internal sd status to system info

This commit is contained in:
fr500 2015-07-12 20:55:44 -04:00
parent 39fb39f5f6
commit 22b3bc3243
3 changed files with 23 additions and 7 deletions

View File

@ -37,6 +37,13 @@
struct android_app *g_android;
static pthread_key_t thread_key;
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];
static char ext_dir[PATH_MAX_LENGTH];
static INLINE void android_app_write_cmd(void *data, int8_t cmd)
{
struct android_app *android_app = (struct android_app*)data;
@ -443,13 +450,6 @@ static bool device_is_game_console(const char *name)
return false;
}
static char screenshot_dir[PATH_MAX_LENGTH];
static char downloads_dir[PATH_MAX_LENGTH];
char apk_path[PATH_MAX_LENGTH];
static char sdcard_dir[PATH_MAX_LENGTH];
char app_dir[PATH_MAX_LENGTH];
char ext_dir[PATH_MAX_LENGTH];
static bool test_permissions(const char *path)
{
RARCH_LOG("Testing permissions for %s\n",path);

View File

@ -29,6 +29,10 @@
#include <rthreads/rthreads.h>
static bool test_permissions(const char *path);
static char sdcard_dir[PATH_MAX_LENGTH];
struct android_app
{
ANativeActivity* activity;

View File

@ -38,6 +38,10 @@
#include "../git_version.h"
#include "../performance.h"
#ifdef ANDROID
#include "../frontend/drivers/platform_android.h"
#endif
#ifdef HAVE_NETWORKING
extern char *core_buf;
extern size_t core_len;
@ -315,6 +319,14 @@ static int menu_displaylist_parse_system_info(menu_displaylist_info_t *info)
rarch_info_get_capabilities(RARCH_CAPABILITIES_COMPILER, tmp, sizeof(tmp));
menu_list_push(info->list, tmp, "", MENU_SETTINGS_CORE_INFO_NONE, 0, 0);
#ifdef ANDROID
bool perms = test_permissions(sdcard_dir);
snprintf(tmp, sizeof(tmp), "%s: %s", "Internal SD card status", perms ? "read-write" : "read-only");
menu_list_push(info->list, tmp, "",
MENU_SETTINGS_CORE_INFO_NONE, 0, 0);
#endif
{
char cpu_str[PATH_MAX_LENGTH] = {0};