mirror of
https://github.com/CTCaer/RetroArch.git
synced 2024-12-03 16:21:50 +00:00
Create config_get_active_core_path_ptr
This commit is contained in:
parent
410d97dfb0
commit
ac9b3194a5
@ -3157,12 +3157,18 @@ bool config_replace(char *path)
|
||||
return true;
|
||||
}
|
||||
|
||||
const char *config_get_active_core_path(void)
|
||||
char *config_get_active_core_path_ptr(void)
|
||||
{
|
||||
settings_t *settings = config_get_ptr();
|
||||
return settings->path.libretro;
|
||||
}
|
||||
|
||||
const char *config_get_active_core_path(void)
|
||||
{
|
||||
const char *core_path = (const char *)config_get_active_core_path_ptr();
|
||||
return core_path;
|
||||
}
|
||||
|
||||
bool config_active_core_path_is_empty(void)
|
||||
{
|
||||
settings_t *settings = config_get_ptr();
|
||||
|
@ -649,6 +649,8 @@ const char *config_get_active_path(void);
|
||||
|
||||
const char *config_get_active_core_path(void);
|
||||
|
||||
char *config_get_active_core_path_ptr(void);
|
||||
|
||||
void config_set_active_core_path(const char *path);
|
||||
|
||||
void config_clear_active_core_path(void);
|
||||
|
@ -336,7 +336,8 @@ static void load_dynamic_core(void)
|
||||
/* Need to use absolute path for this setting. It can be
|
||||
* saved to content history, and a relative path would
|
||||
* break in that scenario. */
|
||||
path_resolve_realpath(settings->path.libretro,
|
||||
path_resolve_realpath(
|
||||
config_get_active_core_path_ptr(),
|
||||
config_get_active_core_path_size());
|
||||
|
||||
RARCH_LOG("Loading dynamic libretro core from: \"%s\"\n",
|
||||
|
@ -40,8 +40,6 @@
|
||||
**/
|
||||
void main_exit(void *args)
|
||||
{
|
||||
settings_t *settings = config_get_ptr();
|
||||
|
||||
command_event(CMD_EVENT_MENU_SAVE_CURRENT_CONFIG, NULL);
|
||||
|
||||
#ifdef HAVE_MENU
|
||||
@ -57,7 +55,8 @@ void main_exit(void *args)
|
||||
#endif
|
||||
|
||||
frontend_driver_deinit(args);
|
||||
frontend_driver_exitspawn(settings->path.libretro,
|
||||
frontend_driver_exitspawn(
|
||||
config_get_active_core_path_ptr(),
|
||||
config_get_active_core_path_size());
|
||||
|
||||
rarch_ctl(RARCH_CTL_DESTROY, NULL);
|
||||
|
@ -4023,7 +4023,7 @@ static bool setting_append_list(
|
||||
if (frontend_driver_has_fork())
|
||||
#endif
|
||||
{
|
||||
char ext_name[PATH_MAX_LENGTH];
|
||||
char ext_name[PATH_MAX_LENGTH] = {0};
|
||||
|
||||
if (frontend_driver_get_core_extension(ext_name, sizeof(ext_name)))
|
||||
{
|
||||
@ -4035,7 +4035,7 @@ static bool setting_append_list(
|
||||
&subgroup_info,
|
||||
parent_group);
|
||||
(*list)[list_info->index - 1].size = config_get_active_core_path_size();
|
||||
(*list)[list_info->index - 1].value.target.string = settings->path.libretro;
|
||||
(*list)[list_info->index - 1].value.target.string = config_get_active_core_path_ptr();
|
||||
(*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);
|
||||
|
Loading…
Reference in New Issue
Block a user