mirror of
https://github.com/libretro/RetroArch.git
synced 2024-11-27 02:00:41 +00:00
(paths.c) Cleanups
This commit is contained in:
parent
ab7bc7755e
commit
bd77ac145b
18
dirs.h
18
dirs.h
@ -30,42 +30,24 @@ enum rarch_dir_type
|
||||
RARCH_DIR_OSK_OVERLAY
|
||||
};
|
||||
|
||||
/* init functions */
|
||||
|
||||
bool dir_init_shader(void);
|
||||
|
||||
/* free functions */
|
||||
|
||||
bool dir_free_shader(void);
|
||||
|
||||
/* check functions */
|
||||
|
||||
void dir_check_shader(bool pressed_next, bool pressed_prev);
|
||||
|
||||
/* empty functions */
|
||||
|
||||
bool dir_is_empty(enum rarch_dir_type type);
|
||||
|
||||
/* clear functions */
|
||||
|
||||
void dir_clear(enum rarch_dir_type type);
|
||||
|
||||
void dir_clear_all(void);
|
||||
|
||||
/* get size functions */
|
||||
|
||||
size_t dir_get_size(enum rarch_dir_type type);
|
||||
|
||||
/* get ptr functions */
|
||||
|
||||
char *dir_get_ptr(enum rarch_dir_type type);
|
||||
|
||||
/* get functions */
|
||||
|
||||
const char *dir_get(enum rarch_dir_type type);
|
||||
|
||||
/* set functions */
|
||||
|
||||
void dir_set(enum rarch_dir_type type, const char *path);
|
||||
|
||||
void dir_check_defaults(void);
|
||||
|
@ -234,7 +234,7 @@ static void load_dynamic_core(void)
|
||||
* break in that scenario. */
|
||||
path_resolve_realpath(
|
||||
path_get_core_ptr(),
|
||||
path_get_core_size());
|
||||
path_get_ptr_size(RARCH_PATH_CORE));
|
||||
|
||||
RARCH_LOG("Loading dynamic libretro core from: \"%s\"\n",
|
||||
path_get(RARCH_PATH_CORE));
|
||||
|
@ -64,7 +64,7 @@ void main_exit(void *args)
|
||||
#endif
|
||||
|
||||
frontend_driver_deinit(args);
|
||||
frontend_driver_exitspawn(path_get_core_ptr(), path_get_core_size());
|
||||
frontend_driver_exitspawn(path_get_core_ptr(), path_get_ptr_size(RARCH_PATH_CORE));
|
||||
|
||||
rarch_ctl(RARCH_CTL_DESTROY, NULL);
|
||||
|
||||
|
@ -2148,7 +2148,7 @@ static bool setting_append_list(
|
||||
&group_info,
|
||||
&subgroup_info,
|
||||
parent_group);
|
||||
(*list)[list_info->index - 1].size = path_get_core_size();
|
||||
(*list)[list_info->index - 1].size = path_get_ptr_size(RARCH_PATH_CORE);
|
||||
(*list)[list_info->index - 1].value.target.string = path_get_core_ptr();
|
||||
(*list)[list_info->index - 1].values = ext_name;
|
||||
menu_settings_list_current_add_cmd(list, list_info, CMD_EVENT_LOAD_CORE);
|
||||
@ -4393,7 +4393,7 @@ static bool setting_append_list(
|
||||
CONFIG_PATH(
|
||||
list, list_info,
|
||||
path_get_record_config_ptr(),
|
||||
path_get_record_config_size(),
|
||||
path_get_ptr_size(RARCH_PATH_RECORD_CONFIG),
|
||||
msg_hash_to_str(MENU_ENUM_LABEL_RECORD_CONFIG),
|
||||
msg_hash_to_str(MENU_ENUM_LABEL_VALUE_RECORD_CONFIG),
|
||||
"",
|
||||
@ -4408,7 +4408,7 @@ static bool setting_append_list(
|
||||
CONFIG_STRING(
|
||||
list, list_info,
|
||||
path_get_record_ptr(),
|
||||
path_get_record_size(),
|
||||
path_get_ptr_size(RARCH_PATH_RECORD),
|
||||
msg_hash_to_str(MENU_ENUM_LABEL_RECORD_PATH),
|
||||
msg_hash_to_str(MENU_ENUM_LABEL_VALUE_RECORD_PATH),
|
||||
"",
|
||||
@ -5811,7 +5811,7 @@ static bool setting_append_list(
|
||||
CONFIG_STRING(
|
||||
list, list_info,
|
||||
path_get_server_ptr(),
|
||||
path_get_server_size(),
|
||||
path_get_ptr_size(RARCH_PATH_SERVER),
|
||||
msg_hash_to_str(MENU_ENUM_LABEL_NETPLAY_IP_ADDRESS),
|
||||
msg_hash_to_str(MENU_ENUM_LABEL_VALUE_NETPLAY_IP_ADDRESS),
|
||||
"",
|
||||
|
32
paths.c
32
paths.c
@ -562,24 +562,24 @@ const char *path_get(enum rarch_path_type type)
|
||||
return NULL;
|
||||
}
|
||||
|
||||
size_t path_get_record_size(void)
|
||||
size_t path_get_ptr_size(enum rarch_path_type type)
|
||||
{
|
||||
return sizeof(path_record);
|
||||
}
|
||||
switch (type)
|
||||
{
|
||||
case RARCH_PATH_RECORD:
|
||||
return sizeof(path_record);
|
||||
case RARCH_PATH_RECORD_CONFIG:
|
||||
return sizeof(path_record_config);
|
||||
case RARCH_PATH_SERVER:
|
||||
return sizeof(path_server);
|
||||
case RARCH_PATH_CORE:
|
||||
return sizeof(path_libretro);
|
||||
default:
|
||||
case RARCH_PATH_NONE:
|
||||
break;
|
||||
}
|
||||
|
||||
size_t path_get_record_config_size(void)
|
||||
{
|
||||
return sizeof(path_record_config);
|
||||
}
|
||||
|
||||
size_t path_get_server_size(void)
|
||||
{
|
||||
return sizeof(path_server);
|
||||
}
|
||||
|
||||
size_t path_get_core_size(void)
|
||||
{
|
||||
return sizeof(path_libretro);
|
||||
return 0;
|
||||
}
|
||||
|
||||
static void path_set_names(const char *path)
|
||||
|
25
paths.h
25
paths.h
@ -61,13 +61,8 @@ void path_deinit_savefile(void);
|
||||
|
||||
void path_init_savefile(void);
|
||||
|
||||
/* fill functions */
|
||||
|
||||
void path_fill_names(void);
|
||||
|
||||
/* set functions */
|
||||
|
||||
|
||||
bool path_set(enum rarch_path_type type, const char *path);
|
||||
|
||||
void path_set_redirect(void);
|
||||
@ -76,17 +71,7 @@ void path_set_special(char **argv, unsigned num_content);
|
||||
|
||||
void path_set_basename(const char *path);
|
||||
|
||||
/* get size functions */
|
||||
|
||||
size_t path_get_record_size(void);
|
||||
|
||||
size_t path_get_record_config_size(void);
|
||||
|
||||
size_t path_get_server_size(void);
|
||||
|
||||
size_t path_get_core_size(void);
|
||||
|
||||
/* get ptr functions */
|
||||
size_t path_get_ptr_size(enum rarch_path_type type);
|
||||
|
||||
char *path_get_record_ptr(void);
|
||||
|
||||
@ -96,12 +81,8 @@ char *path_get_core_ptr(void);
|
||||
|
||||
char *path_get_server_ptr(void);
|
||||
|
||||
/* get list functions */
|
||||
|
||||
struct string_list *path_get_subsystem_list(void);
|
||||
|
||||
/* get functions */
|
||||
|
||||
const char *path_get(enum rarch_path_type type);
|
||||
|
||||
bool path_get_content(char **fullpath);
|
||||
@ -110,14 +91,10 @@ const char *path_get_current_savefile_dir(void);
|
||||
|
||||
bool path_get_default_shader_preset(char **preset);
|
||||
|
||||
/* clear functions */
|
||||
|
||||
void path_clear(enum rarch_path_type type);
|
||||
|
||||
void path_clear_all(void);
|
||||
|
||||
/* is functions */
|
||||
|
||||
bool path_is_empty(enum rarch_path_type type);
|
||||
|
||||
enum rarch_content_type path_is_media_type(const char *path);
|
||||
|
Loading…
Reference in New Issue
Block a user