This commit is contained in:
Themaister 2011-06-11 22:02:05 +02:00
parent 99e85684db
commit 5385806e74
2 changed files with 10 additions and 6 deletions

View File

@ -1200,7 +1200,6 @@ static bool gl_xml_shader(void *data, const char *path)
//if (!gl_check_error())
// SSNES_WARN("Error happened before deinit!\n");
gl_shader_deinit();
//if (!gl_check_error())
// SSNES_WARN("Error happened in deinit!\n");
@ -1220,6 +1219,8 @@ static bool gl_xml_shader(void *data, const char *path)
}
#endif
gl_shader_deinit();
//if (!gl_check_error())
// SSNES_WARN("Failed to deinit rendering path properly!\n");

View File

@ -246,8 +246,9 @@ void gl_cg_set_params(unsigned width, unsigned height,
void gl_cg_deinit(void)
{
if (cg_active)
cgDestroyContext(cgCtx);
if (!cg_active)
return;
cg_active = false;
cg_shader_num = 0;
memset(prg, 0, sizeof(prg));
@ -262,6 +263,8 @@ void gl_cg_deinit(void)
snes_tracker_free(snes_tracker);
snes_tracker = NULL;
}
cgDestroyContext(cgCtx);
}
static bool load_plain(const char *path)