Get rid of path_get_content

This commit is contained in:
twinaphex 2016-10-03 15:43:03 +02:00
parent 25f27c3f4c
commit f66e447139
5 changed files with 11 additions and 29 deletions

View File

@ -392,9 +392,7 @@ static int frontend_ps3_exec_exitspawn(const char *path,
static void frontend_ps3_exec(const char *path, bool should_load_game)
{
#ifndef IS_SALAMANDER
char *fullpath = NULL;
bool original_verbose = verbosity_is_enabled();
verbosity_enable();
#endif
@ -403,12 +401,10 @@ static void frontend_ps3_exec(const char *path, bool should_load_game)
RARCH_LOG("Attempt to load executable: [%s].\n", path);
#ifndef IS_SALAMANDER
path_get_content(&fullpath);
if (should_load_game && !string_is_empty(fullpath))
if (should_load_game && !path_is_empty(RARCH_PATH_CONTENT))
{
char game_path[256];
strlcpy(game_path, fullpath, sizeof(game_path));
strlcpy(game_path, path_get(RARCH_PATH_CONTENT), sizeof(game_path));
const char * const spawn_argv[] = {
game_path,

View File

@ -332,7 +332,6 @@ static void frontend_psp_init(void *data)
static void frontend_psp_exec(const char *path, bool should_load_game)
{
#if defined(HAVE_KERNEL_PRX) || defined(IS_SALAMANDER) || defined(VITA)
char *fullpath = NULL;
char argp[512] = {0};
SceSize args = 0;
@ -340,12 +339,10 @@ static void frontend_psp_exec(const char *path, bool should_load_game)
args = strlen(argp) + 1;
#ifndef IS_SALAMANDER
path_get_content(&fullpath);
if (should_load_game && !string_is_empty(fullpath))
if (should_load_game && !path_is_empty(RARCH_PATH_CONTENT))
{
argp[args] = '\0';
strlcat(argp + args, fullpath, sizeof(argp) - args);
strlcat(argp + args, path_get(RARCH_PATH_CONTENT), sizeof(argp) - args);
args += strlen(argp + args) + 1;
}
#endif

View File

@ -136,10 +136,7 @@ void system_exec_wii(const char *_path, bool should_load_game)
#ifdef IS_SALAMANDER
strlcpy(game_path, gx_rom_path, sizeof(game_path));
#else
char *fullpath = NULL;
path_get_content(&fullpath);
strlcpy(game_path, fullpath, sizeof(game_path));
strlcpy(game_path, path_get(RARCH_PATH_CONTENT), sizeof(game_path));
#endif
}

View File

@ -1263,26 +1263,21 @@ static void frontend_xdk_exec(const char *path, bool should_load_game)
XLaunchNewImage(path, NULL);
#else
#ifdef _XBOX
char *fullpath = NULL;
path_get_content(&fullpath);
#if defined(_XBOX1)
LAUNCH_DATA ptr;
memset(&ptr, 0, sizeof(ptr));
if (should_load_game && !string_is_empty(fullpath))
snprintf((char*)ptr.Data, sizeof(ptr.Data), "%s", fullpath);
if (should_load_game && !path_is_empty(RARCH_PATH_CONTENT))
snprintf((char*)ptr.Data, sizeof(ptr.Data), "%s", path_get(RARCH_PATH_CONTENT));
if (!string_is_empty(path))
XLaunchNewImage(path, !string_is_empty(ptr.Data) ? &ptr : NULL);
#elif defined(_XBOX360)
char game_path[1024] = {0};
if (should_load_game && !string_is_empty(fullpath))
if (should_load_game && !path_is_empty(RARCH_PATH_CONTENT))
{
strlcpy(game_path, fullpath, sizeof(game_path));
strlcpy(game_path, path_get(RARCH_PATH_CONTENT), sizeof(game_path));
XSetLaunchData(game_path, MAX_LAUNCH_DATA_SIZE);
}

View File

@ -132,7 +132,6 @@ INT_PTR CALLBACK PickCoreProc(HWND hDlg, UINT message,
size_t list_size;
core_info_list_t *core_info_list = NULL;
const core_info_t *core_info = NULL;
char *fullpath = NULL;
switch (message)
{
@ -142,10 +141,9 @@ INT_PTR CALLBACK PickCoreProc(HWND hDlg, UINT message,
unsigned i;
/* Add items to list. */
path_get_content(&fullpath);
core_info_get_list(&core_info_list);
core_info_list_get_supported_cores(core_info_list,
(const char*)fullpath, &core_info, &list_size);
path_get(RARCH_PATH_CONTENT), &core_info, &list_size);
hwndList = GetDlgItem(hDlg, ID_CORELISTBOX);
@ -175,12 +173,11 @@ INT_PTR CALLBACK PickCoreProc(HWND hDlg, UINT message,
{
int lbItem;
const core_info_t *info = NULL;
path_get_content(&fullpath);
HWND hwndList = GetDlgItem(hDlg, ID_CORELISTBOX);
lbItem = (int)SendMessage(hwndList, LB_GETCURSEL, 0, 0);
core_info_get_list(&core_info_list);
core_info_list_get_supported_cores(core_info_list,
(const char*)fullpath, &core_info, &list_size);
path_get(RARCH_PATH_CONTENT), &core_info, &list_size);
info = (const core_info_t*)&core_info[lbItem];
runloop_ctl(RUNLOOP_CTL_SET_LIBRETRO_PATH,info->path);
}