From 988d1b3334ede2aeb0806c5ec54f4b903c6261bf Mon Sep 17 00:00:00 2001 From: Themaister Date: Wed, 5 Jan 2011 19:29:29 +0100 Subject: [PATCH] Add a warning when both Cg and XML shaders are selected. --- general.h | 4 ++++ gfx/gl.c | 3 +++ 2 files changed, 7 insertions(+) diff --git a/general.h b/general.h index 048abde579..a26b35b0d2 100644 --- a/general.h +++ b/general.h @@ -98,4 +98,8 @@ extern struct global g_extern; fprintf(stderr, "SSNES [ERROR] :: " msg, ##args); \ } while(0) +#define SSNES_WARN(msg, args...) do { \ + fprintf(stderr, "SSNES [WARN] :: " msg, ##args); \ + } while(0) + #endif diff --git a/gfx/gl.c b/gfx/gl.c index bf2cdaca75..04d8606c2e 100644 --- a/gfx/gl.c +++ b/gfx/gl.c @@ -172,6 +172,9 @@ static const input_driver_t input_glfw = { static inline bool gl_shader_init(void) { + if (strlen(g_settings.video.cg_shader_path) > 0 && strlen(g_settings.video.bsnes_shader_path) > 0) + SSNES_WARN("Both Cg and bSNES XML shader are defined in config file. Cg shader will be selected by default.\n"); + #ifdef HAVE_CG if (strlen(g_settings.video.cg_shader_path) > 0) return gl_cg_init(g_settings.video.cg_shader_path);