mirror of
https://github.com/libretro/RetroArch
synced 2025-03-30 07:20:36 +00:00
Start using dirs functions
This commit is contained in:
parent
017d05fd36
commit
413d14ad49
@ -56,6 +56,7 @@
|
||||
#include "../msg_hash.h"
|
||||
#include "../defaults.h"
|
||||
#include "../driver.h"
|
||||
#include "../dirs.h"
|
||||
#include "../paths.h"
|
||||
#include "../dynamic.h"
|
||||
#include "../runloop.h"
|
||||
@ -6544,7 +6545,7 @@ static bool setting_append_list(
|
||||
|
||||
CONFIG_DIR(
|
||||
list, list_info,
|
||||
global->dir.savefile,
|
||||
dir_get_savefile_ptr(),
|
||||
sizeof(global->dir.savefile),
|
||||
msg_hash_to_str(MENU_ENUM_LABEL_SAVEFILE_DIRECTORY),
|
||||
msg_hash_to_str(MENU_ENUM_LABEL_VALUE_SAVEFILE_DIRECTORY),
|
||||
@ -6559,7 +6560,7 @@ static bool setting_append_list(
|
||||
|
||||
CONFIG_DIR(
|
||||
list, list_info,
|
||||
global->dir.savestate,
|
||||
dir_get_savestate_ptr(),
|
||||
sizeof(global->dir.savestate),
|
||||
msg_hash_to_str(MENU_ENUM_LABEL_SAVESTATE_DIRECTORY),
|
||||
msg_hash_to_str(MENU_ENUM_LABEL_VALUE_SAVESTATE_DIRECTORY),
|
||||
|
9
paths.c
9
paths.c
@ -25,6 +25,7 @@
|
||||
#include "config.h"
|
||||
#endif
|
||||
|
||||
#include "dirs.h"
|
||||
#include "paths.h"
|
||||
|
||||
#include "configuration.h"
|
||||
@ -65,8 +66,8 @@ void path_set_redirect(void)
|
||||
if (!global)
|
||||
return;
|
||||
|
||||
old_savefile_dir = global->dir.savefile;
|
||||
old_savestate_dir = global->dir.savestate;
|
||||
old_savefile_dir = dir_get_savefile();
|
||||
old_savestate_dir = dir_get_savestate();
|
||||
|
||||
if (info->info.library_name &&
|
||||
!string_is_empty(info->info.library_name))
|
||||
@ -307,7 +308,7 @@ void path_init_savefile(void)
|
||||
global->subsystem_fullpaths ?
|
||||
global->subsystem_fullpaths->size : 0);
|
||||
|
||||
bool use_sram_dir = path_is_directory(global->dir.savefile);
|
||||
bool use_sram_dir = path_is_directory(dir_get_savefile());
|
||||
|
||||
for (i = 0; i < num_content; i++)
|
||||
{
|
||||
@ -325,7 +326,7 @@ void path_init_savefile(void)
|
||||
if (use_sram_dir)
|
||||
{
|
||||
/* Redirect content fullpath to save directory. */
|
||||
strlcpy(path, global->dir.savefile, sizeof(path));
|
||||
strlcpy(path, dir_get_savefile(), sizeof(path));
|
||||
fill_pathname_dir(path,
|
||||
global->subsystem_fullpaths->elems[i].data, ext,
|
||||
sizeof(path));
|
||||
|
@ -86,6 +86,7 @@
|
||||
#include "../retroarch.h"
|
||||
#include "../file_path_special.h"
|
||||
#include "../core.h"
|
||||
#include "../dirs.h"
|
||||
#include "../paths.h"
|
||||
#include "../verbosity.h"
|
||||
|
||||
@ -1608,9 +1609,9 @@ static void menu_content_environment_get(int *argc, char *argv[],
|
||||
if (!path_is_config_empty())
|
||||
wrap_args->config_path = path_get_config();
|
||||
if (!string_is_empty(global->dir.savefile))
|
||||
wrap_args->sram_path = global->dir.savefile;
|
||||
wrap_args->sram_path = dir_get_savefile();
|
||||
if (!string_is_empty(global->dir.savestate))
|
||||
wrap_args->state_path = global->dir.savestate;
|
||||
wrap_args->state_path = dir_get_savestate();
|
||||
if (fullpath && *fullpath)
|
||||
wrap_args->content_path = fullpath;
|
||||
if (!retroarch_override_setting_is_set(RARCH_OVERRIDE_SETTING_LIBRETRO))
|
||||
|
Loading…
x
Reference in New Issue
Block a user