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;
|
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);
|
void config_free(void);
|
||||||
|
|
||||||
|
const char *config_get_active_path(void);
|
||||||
|
|
||||||
settings_t *config_get_ptr(void);
|
settings_t *config_get_ptr(void);
|
||||||
|
|
||||||
RETRO_END_DECLS
|
RETRO_END_DECLS
|
||||||
|
|
|
@ -38,9 +38,8 @@ void menu_shader_manager_init(menu_handle_t *menu)
|
||||||
#ifdef HAVE_SHADER_MANAGER
|
#ifdef HAVE_SHADER_MANAGER
|
||||||
struct video_shader *shader = NULL;
|
struct video_shader *shader = NULL;
|
||||||
config_file_t *conf = NULL;
|
config_file_t *conf = NULL;
|
||||||
const char *config_path = NULL;
|
|
||||||
settings_t *settings = config_get_ptr();
|
settings_t *settings = config_get_ptr();
|
||||||
global_t *global = global_get_ptr();
|
const char *config_path = config_get_active_path();
|
||||||
|
|
||||||
if (!menu)
|
if (!menu)
|
||||||
return;
|
return;
|
||||||
|
@ -48,15 +47,6 @@ void menu_shader_manager_init(menu_handle_t *menu)
|
||||||
menu_driver_ctl(RARCH_MENU_CTL_SHADER_GET,
|
menu_driver_ctl(RARCH_MENU_CTL_SHADER_GET,
|
||||||
&shader);
|
&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
|
/* In a multi-config setting, we can't have
|
||||||
* conflicts on menu.cgp/menu.glslp. */
|
* conflicts on menu.cgp/menu.glslp. */
|
||||||
if (config_path)
|
if (config_path)
|
||||||
|
|
Loading…
Reference in New Issue