mirror of
https://github.com/libretro/RetroArch
synced 2025-03-30 07:20:36 +00:00
Forgot a conditional check in shader_cg.c before doing freeing of
menu_cg_program - some other cleanups to do with setting stock shaders in Cg
This commit is contained in:
parent
d0505dc7fa
commit
9a4ddfd2e0
3
gfx/gl.c
3
gfx/gl.c
@ -292,7 +292,8 @@ static bool gl_shader_init(void *data)
|
||||
#ifdef HAVE_CG
|
||||
case RARCH_SHADER_CG:
|
||||
backend = &gl_cg_backend;
|
||||
shader_path = g_settings.video.cg_shader_path;
|
||||
if (*g_settings.video.cg_shader_path)
|
||||
shader_path = g_settings.video.cg_shader_path;
|
||||
break;
|
||||
#endif
|
||||
|
||||
|
@ -907,7 +907,8 @@ void gl_cg_shader_scale(unsigned index, struct gfx_fbo_scale *scale)
|
||||
|
||||
void gl_cg_set_menu_shader(const char *path)
|
||||
{
|
||||
free(menu_cg_program);
|
||||
if (menu_cg_program)
|
||||
free(menu_cg_program);
|
||||
menu_cg_program = strdup(path);
|
||||
}
|
||||
|
||||
|
@ -237,8 +237,6 @@ static bool shader_parse_imports(config_file_t *conf, struct gfx_shader *shader)
|
||||
return false;
|
||||
}
|
||||
|
||||
enum state_ram_type ram_type = RARCH_STATE_NONE;
|
||||
|
||||
if (strcmp(semantic, "capture") == 0)
|
||||
var->type = RARCH_STATE_CAPTURE;
|
||||
else if (strcmp(semantic, "transition") == 0)
|
||||
|
Loading…
x
Reference in New Issue
Block a user