mirror of
https://github.com/libretro/RetroArch
synced 2025-04-01 04:20:27 +00:00
(Platform unix) Updates
This commit is contained in:
parent
698387e762
commit
1ced1b3f73
@ -144,10 +144,13 @@ int system_property_get(const char *command,
|
|||||||
char buffer[PATH_MAX_LENGTH] = {0};
|
char buffer[PATH_MAX_LENGTH] = {0};
|
||||||
char cmd[PATH_MAX_LENGTH] = {0};
|
char cmd[PATH_MAX_LENGTH] = {0};
|
||||||
char *curpos = NULL;
|
char *curpos = NULL;
|
||||||
|
size_t copied = strlcpy(cmd, command, sizeof(cmd));
|
||||||
|
|
||||||
snprintf(cmd, sizeof(cmd), "%s %s", command, args);
|
string_add_space_fast(cmd, copied);
|
||||||
|
|
||||||
pipe = popen(cmd, "r");
|
copied = strlcat(cmd, args, sizeof(cmd));
|
||||||
|
|
||||||
|
pipe = popen(cmd, "r");
|
||||||
|
|
||||||
if (!pipe)
|
if (!pipe)
|
||||||
goto error;
|
goto error;
|
||||||
@ -1689,13 +1692,21 @@ static void frontend_unix_get_env(int *argc,
|
|||||||
const char *home = getenv("HOME");
|
const char *home = getenv("HOME");
|
||||||
|
|
||||||
if (xdg)
|
if (xdg)
|
||||||
snprintf(base_path, sizeof(base_path),
|
{
|
||||||
"%s/retroarch", xdg);
|
size_t copied = strlcpy(base_path, xdg, sizeof(base_path));
|
||||||
|
string_add_backslash_fast(base_path, copied);
|
||||||
|
copied = strlcat(base_path, "retroarch", sizeof(base_path));
|
||||||
|
}
|
||||||
else if (home)
|
else if (home)
|
||||||
snprintf(base_path, sizeof(base_path),
|
{
|
||||||
"%s/.config/retroarch", home);
|
size_t copied = strlcpy(base_path, home, sizeof(base_path));
|
||||||
|
string_add_backslash_fast(base_path, copied);
|
||||||
|
copied = strlcat(base_path, ".config", sizeof(base_path));
|
||||||
|
string_add_backslash_fast(base_path, copied);
|
||||||
|
copied = strlcat(base_path, "retroarch", sizeof(base_path));
|
||||||
|
}
|
||||||
else
|
else
|
||||||
snprintf(base_path, sizeof(base_path), "retroarch");
|
strlcpy(base_path, "retroarch", sizeof(base_path));
|
||||||
|
|
||||||
fill_pathname_join(g_defaults.dirs[DEFAULT_DIR_CORE], base_path,
|
fill_pathname_join(g_defaults.dirs[DEFAULT_DIR_CORE], base_path,
|
||||||
"cores", sizeof(g_defaults.dirs[DEFAULT_DIR_CORE]));
|
"cores", sizeof(g_defaults.dirs[DEFAULT_DIR_CORE]));
|
||||||
|
@ -554,8 +554,7 @@ static void frontend_win32_environment_get(int *argc, char *argv[],
|
|||||||
":\\logs", sizeof(g_defaults.dirs[DEFAULT_DIR_LOGS]));
|
":\\logs", sizeof(g_defaults.dirs[DEFAULT_DIR_LOGS]));
|
||||||
#ifdef HAVE_MENU
|
#ifdef HAVE_MENU
|
||||||
#if defined(HAVE_OPENGL) || defined(HAVE_OPENGL1) || defined(HAVE_OPENGLES) || defined(HAVE_OPENGL_CORE)
|
#if defined(HAVE_OPENGL) || defined(HAVE_OPENGL1) || defined(HAVE_OPENGLES) || defined(HAVE_OPENGL_CORE)
|
||||||
snprintf(g_defaults.settings.menu,
|
strlcpy(g_defaults.settings.menu, "xmb", sizeof(g_defaults.settings.menu));
|
||||||
sizeof(g_defaults.settings.menu), "xmb");
|
|
||||||
#endif
|
#endif
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user