diff --git a/frontend/menu/backend/menu_common_backend.c b/frontend/menu/backend/menu_common_backend.c index dc23592203..3029f4b841 100644 --- a/frontend/menu/backend/menu_common_backend.c +++ b/frontend/menu/backend/menu_common_backend.c @@ -350,9 +350,8 @@ static void menu_common_entries_init(menu_handle_t *menu, unsigned menu_type) file_list_push(menu->selection_buf, "", "game_history_path", MENU_CONTENT_HISTORY_PATH, 0); file_list_push(menu->selection_buf, "", "video_filter_dir", MENU_FILTER_DIR_PATH, 0); file_list_push(menu->selection_buf, "", "audio_filter_dir", MENU_DSP_FILTER_DIR_PATH, 0); -#ifdef HAVE_SHADER_MANAGER - file_list_push(menu->selection_buf, "", "video_shader_dir", MENU_SHADER_DIR_PATH, 0); -#endif + if ((current_setting = (rarch_setting_t*)setting_data_find_setting(setting_data, "video_shader_dir"))) + file_list_push(menu->selection_buf, "", "video_shader_dir", MENU_SHADER_DIR_PATH, 0); file_list_push(menu->selection_buf, "", "savestate_directory", MENU_SAVESTATE_DIR_PATH, 0); file_list_push(menu->selection_buf, "", "savefile_directory", MENU_SAVEFILE_DIR_PATH, 0); if ((current_setting = (rarch_setting_t*)setting_data_find_setting(setting_data, "overlay_directory"))) diff --git a/frontend/menu/menu_common.h b/frontend/menu/menu_common.h index 234b0f890b..4d8dc0ecaf 100644 --- a/frontend/menu/menu_common.h +++ b/frontend/menu/menu_common.h @@ -31,15 +31,7 @@ #include "../../input/input_common.h" #include "../../input/keyboard_line.h" #include "../../performance.h" - -#if defined(HAVE_CG) || defined(HAVE_HLSL) || defined(HAVE_GLSL) - -#ifndef HAVE_SHADER_MANAGER -#define HAVE_SHADER_MANAGER -#endif - -#include "../../gfx/shader_parse.h" -#endif +#include "../../gfx/shader_common.h" #ifdef HAVE_RGUI #define MENU_TEXTURE_FULLSCREEN false diff --git a/gfx/shader_common.h b/gfx/shader_common.h index d33713ff6d..3e3f9b9144 100644 --- a/gfx/shader_common.h +++ b/gfx/shader_common.h @@ -27,9 +27,15 @@ #endif #include "gfx_context.h" -#include "shader_parse.h" #include "math/matrix.h" +#if defined(HAVE_CG) || defined(HAVE_HLSL) || defined(HAVE_GLSL) +#ifndef HAVE_SHADER_MANAGER +#define HAVE_SHADER_MANAGER +#endif + +#include "shader_parse.h" + #define GL_SHADER_STOCK_BLEND (GFX_MAX_SHADERS - 1) struct gl_shader_backend @@ -58,6 +64,7 @@ struct gl_shader_backend enum rarch_shader_type type; }; +#endif #ifdef HAVE_OPENGL void gl_load_texture_data(GLuint obj, const struct texture_image *img, @@ -66,4 +73,3 @@ bool gl_load_luts(const struct gfx_shader *generic_shader, GLuint *lut_textures) #endif #endif - diff --git a/settings_data.c b/settings_data.c index 6f178af064..90e6b69ca5 100644 --- a/settings_data.c +++ b/settings_data.c @@ -16,6 +16,7 @@ #include "settings_data.h" #include "file_path.h" +#include "gfx/shader_common.h" #include "input/input_common.h" #include "config.def.h" @@ -1809,7 +1810,7 @@ rarch_setting_t* setting_data_get_list(void) CONFIG_DIR(g_settings.video.filter_dir, "video_filter_dir", "VideoFilter Directory", "", GROUP_NAME, SUBGROUP_NAME, general_write_handler, general_read_handler) WITH_FLAGS(SD_FLAG_ALLOW_EMPTY | SD_FLAG_PATH_DIR) CONFIG_DIR(g_settings.audio.filter_dir, "audio_filter_dir", "AudioFilter Directory", "", GROUP_NAME, SUBGROUP_NAME, general_write_handler, general_read_handler) WITH_FLAGS(SD_FLAG_ALLOW_EMPTY | SD_FLAG_PATH_DIR) -#ifdef HAVE_DYLIB +#if defined(HAVE_DYLIB) && defined(HAVE_SHADER_MANAGER) CONFIG_DIR(g_settings.video.shader_dir, "video_shader_dir", "Shader Directory", g_defaults.shader_dir ? g_defaults.shader_dir : "", GROUP_NAME, SUBGROUP_NAME, general_write_handler, general_read_handler) WITH_FLAGS(SD_FLAG_ALLOW_EMPTY | SD_FLAG_PATH_DIR) #endif