mirror of
https://github.com/libretro/RetroArch
synced 2025-04-10 15:45:19 +00:00
Cleanup
This commit is contained in:
parent
5f87717295
commit
5004113ce1
40
retroarch.c
40
retroarch.c
@ -391,27 +391,14 @@ static void retroarch_set_special_paths(char **argv, unsigned num_content)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
const char *retroarch_get_current_savefile_dir(void)
|
static void retroarch_set_paths_redirect(void)
|
||||||
{
|
{
|
||||||
char *ret = current_savefile_dir;
|
char current_savestate_dir[PATH_MAX_LENGTH] = {0};
|
||||||
|
uint32_t global_library_name_hash = 0;
|
||||||
/* try to infer the path in case it's still empty by calling
|
bool check_global_library_name_hash = false;
|
||||||
set_paths_redirect */
|
global_t *global = global_get_ptr();
|
||||||
if (string_is_empty(ret))
|
settings_t *settings = config_get_ptr();
|
||||||
rarch_ctl(RARCH_CTL_SET_PATHS_REDIRECT, NULL);
|
rarch_system_info_t *info = NULL;
|
||||||
RARCH_LOG("Environ SAVE_DIRECTORY: \"%s\".\n", ret);
|
|
||||||
|
|
||||||
return ret;
|
|
||||||
}
|
|
||||||
|
|
||||||
static void retroarch_set_paths_redirect()
|
|
||||||
{
|
|
||||||
char current_savestate_dir[PATH_MAX_LENGTH];
|
|
||||||
uint32_t global_library_name_hash = 0;
|
|
||||||
bool check_global_library_name_hash = false;
|
|
||||||
global_t *global = global_get_ptr();
|
|
||||||
settings_t *settings = config_get_ptr();
|
|
||||||
rarch_system_info_t *info = NULL;
|
|
||||||
|
|
||||||
runloop_ctl(RUNLOOP_CTL_SYSTEM_INFO_GET, &info);
|
runloop_ctl(RUNLOOP_CTL_SYSTEM_INFO_GET, &info);
|
||||||
|
|
||||||
@ -544,6 +531,19 @@ static void retroarch_set_paths_redirect()
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
const char *retroarch_get_current_savefile_dir(void)
|
||||||
|
{
|
||||||
|
char *ret = current_savefile_dir;
|
||||||
|
|
||||||
|
/* try to infer the path in case it's still empty by calling
|
||||||
|
set_paths_redirect */
|
||||||
|
if (string_is_empty(ret) && !content_does_not_need_content())
|
||||||
|
retroarch_set_paths_redirect();
|
||||||
|
|
||||||
|
return ret;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
enum rarch_content_type retroarch_path_is_media_type(const char *path)
|
enum rarch_content_type retroarch_path_is_media_type(const char *path)
|
||||||
{
|
{
|
||||||
uint32_t hash_ext = msg_hash_calculate(path_get_extension(path));
|
uint32_t hash_ext = msg_hash_calculate(path_get_extension(path));
|
||||||
|
Loading…
x
Reference in New Issue
Block a user