Don't dump frame_count_mod unless needed.

This commit is contained in:
Themaister 2013-04-01 15:40:11 +02:00
parent 211e17250c
commit eeddfea425
2 changed files with 12 additions and 2 deletions

View File

@ -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);

View File

@ -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);
}