mirror of
https://github.com/libretro/RetroArch
synced 2025-04-09 21:45:45 +00:00
Hrm ...
This commit is contained in:
parent
99e85684db
commit
5385806e74
9
gfx/gl.c
9
gfx/gl.c
@ -1036,7 +1036,7 @@ static void* gl_init(const video_info_t *video, const input_driver_t **input, vo
|
|||||||
SDL_ShowCursor(SDL_DISABLE);
|
SDL_ShowCursor(SDL_DISABLE);
|
||||||
glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA);
|
glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA);
|
||||||
|
|
||||||
#if (defined(HAVE_XML) || defined(HAVE_CG)) && defined(_WIN32)
|
#if (defined(HAVE_XML) || defined(HAVE_CG)) && defined(_WIN32)
|
||||||
// Win32 GL lib doesn't have some functions needed for XML shaders.
|
// Win32 GL lib doesn't have some functions needed for XML shaders.
|
||||||
// Need to load dynamically :(
|
// Need to load dynamically :(
|
||||||
if (!load_gl_proc())
|
if (!load_gl_proc())
|
||||||
@ -1094,7 +1094,7 @@ static void* gl_init(const video_info_t *video, const input_driver_t **input, vo
|
|||||||
|
|
||||||
// Set up render to texture.
|
// Set up render to texture.
|
||||||
gl_init_fbo(gl, 256 * video->input_scale, 256 * video->input_scale);
|
gl_init_fbo(gl, 256 * video->input_scale, 256 * video->input_scale);
|
||||||
|
|
||||||
gl->keep_aspect = video->force_aspect;
|
gl->keep_aspect = video->force_aspect;
|
||||||
|
|
||||||
// Apparently need to set viewport for passes when we aren't using FBOs.
|
// Apparently need to set viewport for passes when we aren't using FBOs.
|
||||||
@ -1169,7 +1169,7 @@ static void* gl_init(const video_info_t *video, const input_driver_t **input, vo
|
|||||||
*input = NULL;
|
*input = NULL;
|
||||||
|
|
||||||
gl_init_font(gl, g_settings.video.font_path, g_settings.video.font_size);
|
gl_init_font(gl, g_settings.video.font_path, g_settings.video.font_size);
|
||||||
|
|
||||||
if (!gl_check_error())
|
if (!gl_check_error())
|
||||||
{
|
{
|
||||||
SDL_QuitSubSystem(SDL_INIT_VIDEO);
|
SDL_QuitSubSystem(SDL_INIT_VIDEO);
|
||||||
@ -1200,7 +1200,6 @@ static bool gl_xml_shader(void *data, const char *path)
|
|||||||
//if (!gl_check_error())
|
//if (!gl_check_error())
|
||||||
// SSNES_WARN("Error happened before deinit!\n");
|
// SSNES_WARN("Error happened before deinit!\n");
|
||||||
|
|
||||||
gl_shader_deinit();
|
|
||||||
|
|
||||||
//if (!gl_check_error())
|
//if (!gl_check_error())
|
||||||
// SSNES_WARN("Error happened in deinit!\n");
|
// SSNES_WARN("Error happened in deinit!\n");
|
||||||
@ -1220,6 +1219,8 @@ static bool gl_xml_shader(void *data, const char *path)
|
|||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
gl_shader_deinit();
|
||||||
|
|
||||||
//if (!gl_check_error())
|
//if (!gl_check_error())
|
||||||
// SSNES_WARN("Failed to deinit rendering path properly!\n");
|
// SSNES_WARN("Failed to deinit rendering path properly!\n");
|
||||||
|
|
||||||
|
@ -246,8 +246,9 @@ void gl_cg_set_params(unsigned width, unsigned height,
|
|||||||
|
|
||||||
void gl_cg_deinit(void)
|
void gl_cg_deinit(void)
|
||||||
{
|
{
|
||||||
if (cg_active)
|
if (!cg_active)
|
||||||
cgDestroyContext(cgCtx);
|
return;
|
||||||
|
|
||||||
cg_active = false;
|
cg_active = false;
|
||||||
cg_shader_num = 0;
|
cg_shader_num = 0;
|
||||||
memset(prg, 0, sizeof(prg));
|
memset(prg, 0, sizeof(prg));
|
||||||
@ -262,6 +263,8 @@ void gl_cg_deinit(void)
|
|||||||
snes_tracker_free(snes_tracker);
|
snes_tracker_free(snes_tracker);
|
||||||
snes_tracker = NULL;
|
snes_tracker = NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
cgDestroyContext(cgCtx);
|
||||||
}
|
}
|
||||||
|
|
||||||
static bool load_plain(const char *path)
|
static bool load_plain(const char *path)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user