From 7c5f36be61c6402e75c0f00b683361b7d1d5ad52 Mon Sep 17 00:00:00 2001 From: Themaister Date: Thu, 26 May 2011 20:44:12 +0200 Subject: [PATCH] Fix build when config file support isn't compiled in. --- gfx/shader_cg.c | 8 ++++++++ settings.c | 2 ++ 2 files changed, 10 insertions(+) diff --git a/gfx/shader_cg.c b/gfx/shader_cg.c index 5f86ce502a..e89a3a8272 100644 --- a/gfx/shader_cg.c +++ b/gfx/shader_cg.c @@ -273,6 +273,7 @@ static bool load_plain(const char *path) return true; } +#ifdef HAVE_CONFIGFILE static bool load_textures(const char *dir_path, config_file_t *conf) { char *textures; @@ -343,9 +344,11 @@ error: glBindTexture(GL_TEXTURE_2D, 0); return false; } +#endif static bool load_preset(const char *path) { +#ifdef HAVE_CONFIGFILE // Create passthrough shader. prg[0].fprg = cgCreateProgram(cgCtx, CG_SOURCE, stock_cg_program, cgFProf, "main_fragment", 0); prg[0].vprg = cgCreateProgram(cgCtx, CG_SOURCE, stock_cg_program, cgVProf, "main_vertex", 0); @@ -562,6 +565,11 @@ error: if (conf) config_file_free(conf); return false; +#else + (void)path; + SSNES_ERR("No config file support compiled in.\n"); + return false; +#endif } bool gl_cg_init(const char *path) diff --git a/settings.c b/settings.c index 2b8c7c716f..1d62d0316c 100644 --- a/settings.c +++ b/settings.c @@ -181,6 +181,7 @@ void parse_config(void) #endif } +#ifdef HAVE_CONFIGFILE static config_file_t *open_default_config_file(void) { config_file_t *conf = NULL; @@ -236,6 +237,7 @@ static config_file_t *open_default_config_file(void) return conf; } +#endif // Macros to ease config getting. #define CONFIG_GET_BOOL(var, key) if (config_get_bool(conf, key, &tmp_bool)) \