diff --git a/gfx/shader_cg.c b/gfx/shader_cg.c index 6c7585d654..3a46878fe2 100644 --- a/gfx/shader_cg.c +++ b/gfx/shader_cg.c @@ -666,6 +666,13 @@ static bool load_preset(const char *path) config_file_free(conf); +#if 1 + config_file_t *save_test = config_file_new(NULL); + gfx_shader_write_conf_cgp(conf, cg_shader); + config_file_write(save_test, "/tmp/load.cgp"); + config_file_free(save_test); +#endif + if (cg_shader->passes > RARCH_CG_MAX_SHADERS - 3) { RARCH_WARN("Too many shaders ... Capping shader amount to %d.\n", RARCH_CG_MAX_SHADERS - 3); diff --git a/gfx/shader_parse.c b/gfx/shader_parse.c index e5d2cfac2a..a1a7c94b02 100644 --- a/gfx/shader_parse.c +++ b/gfx/shader_parse.c @@ -455,8 +455,11 @@ void gfx_shader_write_conf_cgp(config_file_t *conf, const struct gfx_shader *sha config_set_bool(conf, key, pass->filter == RARCH_FILTER_LINEAR); } - print_buf(key, "frame_count_mod%u", i); - config_set_int(conf, key, pass->frame_count_mod); + if (pass->frame_count_mod) + { + print_buf(key, "frame_count_mod%u", i); + config_set_int(conf, key, pass->frame_count_mod); + } shader_write_fbo(conf, &pass->fbo, i); }