mirror of
https://github.com/libretro/RetroArch
synced 2025-03-03 04:14:00 +00:00
Get rid of path_get_core_size
This commit is contained in:
parent
8963db204d
commit
1f9559cb7a
@ -234,7 +234,7 @@ static void load_dynamic_core(void)
|
||||
* break in that scenario. */
|
||||
path_resolve_realpath(
|
||||
path_get_ptr(RARCH_PATH_CORE),
|
||||
path_get_core_size());
|
||||
path_get_realsize(RARCH_PATH_CORE));
|
||||
|
||||
RARCH_LOG("Loading dynamic libretro core from: \"%s\"\n",
|
||||
path_get(RARCH_PATH_CORE));
|
||||
|
@ -64,7 +64,9 @@ void main_exit(void *args)
|
||||
#endif
|
||||
|
||||
frontend_driver_deinit(args);
|
||||
frontend_driver_exitspawn(path_get_ptr(RARCH_PATH_CORE), path_get_core_size());
|
||||
frontend_driver_exitspawn(
|
||||
path_get_ptr(RARCH_PATH_CORE),
|
||||
path_get_realsize(RARCH_PATH_CORE));
|
||||
|
||||
rarch_ctl(RARCH_CTL_DESTROY, NULL);
|
||||
|
||||
|
@ -2145,7 +2145,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_realsize(RARCH_PATH_CORE);
|
||||
(*list)[list_info->index - 1].value.target.string = path_get_ptr(RARCH_PATH_CORE);
|
||||
(*list)[list_info->index - 1].values = ext_name;
|
||||
menu_settings_list_current_add_cmd(list, list_info, CMD_EVENT_LOAD_CORE);
|
||||
|
28
paths.c
28
paths.c
@ -511,10 +511,32 @@ const char *path_get(enum rarch_path_type type)
|
||||
return NULL;
|
||||
}
|
||||
|
||||
|
||||
size_t path_get_core_size(void)
|
||||
size_t path_get_realsize(enum rarch_path_type type)
|
||||
{
|
||||
return sizeof(path_libretro);
|
||||
switch (type)
|
||||
{
|
||||
case RARCH_PATH_CONTENT:
|
||||
return sizeof(path_content);
|
||||
case RARCH_PATH_DEFAULT_SHADER_PRESET:
|
||||
return sizeof(path_default_shader_preset);
|
||||
case RARCH_PATH_BASENAME:
|
||||
return sizeof(path_main_basename);
|
||||
case RARCH_PATH_CORE_OPTIONS:
|
||||
return sizeof(path_core_options_file);
|
||||
case RARCH_PATH_SUBSYSTEM:
|
||||
return sizeof(subsystem_path);
|
||||
case RARCH_PATH_CONFIG:
|
||||
return sizeof(path_config_file);
|
||||
case RARCH_PATH_CONFIG_APPEND:
|
||||
return sizeof(path_config_append_file);
|
||||
case RARCH_PATH_CORE:
|
||||
return sizeof(path_libretro);
|
||||
case RARCH_PATH_NONE:
|
||||
case RARCH_PATH_NAMES:
|
||||
break;
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
static void path_set_names(const char *path)
|
||||
|
17
paths.h
17
paths.h
@ -51,13 +51,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);
|
||||
@ -66,28 +61,18 @@ void path_set_special(char **argv, unsigned num_content);
|
||||
|
||||
void path_set_basename(const char *path);
|
||||
|
||||
/* get size functions */
|
||||
|
||||
size_t path_get_core_size(void);
|
||||
|
||||
/* get list functions */
|
||||
size_t path_get_realsize(enum rarch_path_type type);
|
||||
|
||||
struct string_list *path_get_subsystem_list(void);
|
||||
|
||||
/* get functions */
|
||||
|
||||
char *path_get_ptr(enum rarch_path_type type);
|
||||
|
||||
const char *path_get(enum rarch_path_type type);
|
||||
|
||||
/* 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…
x
Reference in New Issue
Block a user