mirror of
https://github.com/libretro/RetroArch
synced 2025-03-30 07:20:36 +00:00
Create config_get_active_path
This commit is contained in:
parent
8f720541c9
commit
6ffa5ab6b2
@ -3227,3 +3227,15 @@ bool config_replace(char *path)
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
const char *config_get_active_path(void)
|
||||
{
|
||||
settings_t *settings = config_get_ptr();
|
||||
global_t *global = global_get_ptr();
|
||||
if (!string_is_empty(global->path.core_specific_config)
|
||||
&& settings->core_specific_config)
|
||||
return global->path.core_specific_config;
|
||||
else if (!string_is_empty(global->path.config))
|
||||
return global->path.config;
|
||||
return NULL;
|
||||
}
|
||||
|
@ -596,6 +596,8 @@ bool config_init(void);
|
||||
|
||||
void config_free(void);
|
||||
|
||||
const char *config_get_active_path(void);
|
||||
|
||||
settings_t *config_get_ptr(void);
|
||||
|
||||
RETRO_END_DECLS
|
||||
|
@ -38,9 +38,8 @@ void menu_shader_manager_init(menu_handle_t *menu)
|
||||
#ifdef HAVE_SHADER_MANAGER
|
||||
struct video_shader *shader = NULL;
|
||||
config_file_t *conf = NULL;
|
||||
const char *config_path = NULL;
|
||||
settings_t *settings = config_get_ptr();
|
||||
global_t *global = global_get_ptr();
|
||||
const char *config_path = config_get_active_path();
|
||||
|
||||
if (!menu)
|
||||
return;
|
||||
@ -48,15 +47,6 @@ void menu_shader_manager_init(menu_handle_t *menu)
|
||||
menu_driver_ctl(RARCH_MENU_CTL_SHADER_GET,
|
||||
&shader);
|
||||
|
||||
if (global)
|
||||
{
|
||||
if (!string_is_empty(global->path.core_specific_config)
|
||||
&& settings->core_specific_config)
|
||||
config_path = global->path.core_specific_config;
|
||||
else if (!string_is_empty(global->path.config))
|
||||
config_path = global->path.config;
|
||||
}
|
||||
|
||||
/* In a multi-config setting, we can't have
|
||||
* conflicts on menu.cgp/menu.glslp. */
|
||||
if (config_path)
|
||||
|
Loading…
x
Reference in New Issue
Block a user