From 76a6e61fdd4045a440d85763f5f97abc0c74db54 Mon Sep 17 00:00:00 2001 From: Themaister Date: Fri, 3 Jan 2014 15:31:10 +0100 Subject: [PATCH] Use core-specific config path for RGUI cgp/glslp if applicable. Avoids some collisions. --- frontend/menu/menu_common.c | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/frontend/menu/menu_common.c b/frontend/menu/menu_common.c index 6a186b0860..351207abab 100644 --- a/frontend/menu/menu_common.c +++ b/frontend/menu/menu_common.c @@ -45,13 +45,19 @@ void shader_manager_init(void *data) memset(&rgui->shader, 0, sizeof(rgui->shader)); config_file_t *conf = NULL; + const char *config_path = NULL; + if (*g_extern.core_specific_config_path && g_settings.core_specific_config) + config_path = g_extern.core_specific_config_path; + else if (*g_extern.config_path) + config_path = g_extern.config_path; + // In a multi-config setting, we can't have conflicts on rgui.cgp/rgui.glslp. - if (*g_extern.config_path) + if (config_path) { - fill_pathname_base(rgui->default_glslp, g_extern.config_path, sizeof(rgui->default_glslp)); + fill_pathname_base(rgui->default_glslp, config_path, sizeof(rgui->default_glslp)); path_remove_extension(rgui->default_glslp); strlcat(rgui->default_glslp, ".glslp", sizeof(rgui->default_glslp)); - fill_pathname_base(rgui->default_cgp, g_extern.config_path, sizeof(rgui->default_cgp)); + fill_pathname_base(rgui->default_cgp, config_path, sizeof(rgui->default_cgp)); path_remove_extension(rgui->default_cgp); strlcat(rgui->default_cgp, ".cgp", sizeof(rgui->default_cgp)); }