mirror of
https://github.com/libretro/RetroArch
synced 2025-01-28 14:54:03 +00:00
Create path_get_ptr
This commit is contained in:
parent
bd77ac145b
commit
0e3fbb615e
@ -587,7 +587,7 @@ static int populate_settings_path(settings_t *settings, struct config_path_setti
|
||||
SETTING_PATH("core_updater_buildbot_url", settings->network.buildbot_url, false, NULL, true);
|
||||
SETTING_PATH("core_updater_buildbot_assets_url", settings->network.buildbot_assets_url, false, NULL, true);
|
||||
#ifdef HAVE_NETWORKING
|
||||
SETTING_PATH("netplay_ip_address", path_get_server_ptr(), false, NULL, true);
|
||||
SETTING_PATH("netplay_ip_address", path_get_ptr(RARCH_PATH_SERVER), false, NULL, true);
|
||||
#endif
|
||||
SETTING_PATH("recording_output_directory",
|
||||
global->record.output_dir, false, NULL, true);
|
||||
|
@ -233,7 +233,7 @@ static void load_dynamic_core(void)
|
||||
* saved to content history, and a relative path would
|
||||
* break in that scenario. */
|
||||
path_resolve_realpath(
|
||||
path_get_core_ptr(),
|
||||
path_get_ptr(RARCH_PATH_CORE),
|
||||
path_get_ptr_size(RARCH_PATH_CORE));
|
||||
|
||||
RARCH_LOG("Loading dynamic libretro core from: \"%s\"\n",
|
||||
|
@ -64,7 +64,7 @@ void main_exit(void *args)
|
||||
#endif
|
||||
|
||||
frontend_driver_deinit(args);
|
||||
frontend_driver_exitspawn(path_get_core_ptr(), path_get_ptr_size(RARCH_PATH_CORE));
|
||||
frontend_driver_exitspawn(path_get_ptr(RARCH_PATH_CORE), path_get_ptr_size(RARCH_PATH_CORE));
|
||||
|
||||
rarch_ctl(RARCH_CTL_DESTROY, NULL);
|
||||
|
||||
|
@ -2149,7 +2149,7 @@ static bool setting_append_list(
|
||||
&subgroup_info,
|
||||
parent_group);
|
||||
(*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].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);
|
||||
settings_data_list_current_add_flags(list, list_info, SD_FLAG_BROWSER_ACTION);
|
||||
@ -4392,7 +4392,7 @@ static bool setting_append_list(
|
||||
|
||||
CONFIG_PATH(
|
||||
list, list_info,
|
||||
path_get_record_config_ptr(),
|
||||
path_get_ptr(RARCH_PATH_RECORD_CONFIG),
|
||||
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),
|
||||
@ -4407,7 +4407,7 @@ static bool setting_append_list(
|
||||
|
||||
CONFIG_STRING(
|
||||
list, list_info,
|
||||
path_get_record_ptr(),
|
||||
path_get_ptr(RARCH_PATH_RECORD),
|
||||
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),
|
||||
@ -5810,7 +5810,7 @@ static bool setting_append_list(
|
||||
|
||||
CONFIG_STRING(
|
||||
list, list_info,
|
||||
path_get_server_ptr(),
|
||||
path_get_ptr(RARCH_PATH_SERVER),
|
||||
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
@ -492,24 +492,24 @@ void path_fill_names(void)
|
||||
}
|
||||
}
|
||||
|
||||
char *path_get_record_ptr(void)
|
||||
char *path_get_ptr(enum rarch_path_type type)
|
||||
{
|
||||
return path_record;
|
||||
}
|
||||
switch (type)
|
||||
{
|
||||
case RARCH_PATH_RECORD:
|
||||
return path_record;
|
||||
case RARCH_PATH_RECORD_CONFIG:
|
||||
return path_record_config;
|
||||
case RARCH_PATH_CORE:
|
||||
return path_libretro;
|
||||
case RARCH_PATH_SERVER:
|
||||
return path_server;
|
||||
case RARCH_PATH_NONE:
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
||||
char *path_get_record_config_ptr(void)
|
||||
{
|
||||
return path_record_config;
|
||||
}
|
||||
|
||||
char *path_get_core_ptr(void)
|
||||
{
|
||||
return path_libretro;
|
||||
}
|
||||
|
||||
char *path_get_server_ptr(void)
|
||||
{
|
||||
return path_server;
|
||||
return NULL;
|
||||
}
|
||||
|
||||
const char *path_get(enum rarch_path_type type)
|
||||
|
8
paths.h
8
paths.h
@ -73,13 +73,7 @@ void path_set_basename(const char *path);
|
||||
|
||||
size_t path_get_ptr_size(enum rarch_path_type type);
|
||||
|
||||
char *path_get_record_ptr(void);
|
||||
|
||||
char *path_get_record_config_ptr(void);
|
||||
|
||||
char *path_get_core_ptr(void);
|
||||
|
||||
char *path_get_server_ptr(void);
|
||||
char *path_get_ptr(enum rarch_path_type type);
|
||||
|
||||
struct string_list *path_get_subsystem_list(void);
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user