mirror of
https://github.com/libretro/RetroArch
synced 2025-04-07 13:23:32 +00:00
Check if gl->ctx_driver is non-NULL first in gl_frame
This commit is contained in:
parent
04fe800261
commit
8dc4f66c06
12
gfx/gl.c
12
gfx/gl.c
@ -1493,7 +1493,8 @@ static bool gl_frame(void *data, const void *frame,
|
|||||||
if (gl->should_resize)
|
if (gl->should_resize)
|
||||||
{
|
{
|
||||||
gl->should_resize = false;
|
gl->should_resize = false;
|
||||||
gl->ctx_driver->set_resize(gl, gl->win_width, gl->win_height);
|
if (gl->ctx_driver)
|
||||||
|
gl->ctx_driver->set_resize(gl, gl->win_width, gl->win_height);
|
||||||
|
|
||||||
#ifdef HAVE_FBO
|
#ifdef HAVE_FBO
|
||||||
if (gl->fbo_inited)
|
if (gl->fbo_inited)
|
||||||
@ -1600,7 +1601,8 @@ static bool gl_frame(void *data, const void *frame,
|
|||||||
gl_render_overlay(gl);
|
gl_render_overlay(gl);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
gl->ctx_driver->update_window_title(gl);
|
if (gl->ctx_driver)
|
||||||
|
gl->ctx_driver->update_window_title(gl);
|
||||||
|
|
||||||
RARCH_PERFORMANCE_STOP(frame_run);
|
RARCH_PERFORMANCE_STOP(frame_run);
|
||||||
|
|
||||||
@ -1643,11 +1645,13 @@ static bool gl_frame(void *data, const void *frame,
|
|||||||
!driver.nonblock_state && !g_extern.is_slowmotion
|
!driver.nonblock_state && !g_extern.is_slowmotion
|
||||||
&& !g_extern.is_paused)
|
&& !g_extern.is_paused)
|
||||||
{
|
{
|
||||||
gl->ctx_driver->swap_buffers(gl);
|
if (gl->ctx_driver)
|
||||||
|
gl->ctx_driver->swap_buffers(gl);
|
||||||
glClear(GL_COLOR_BUFFER_BIT);
|
glClear(GL_COLOR_BUFFER_BIT);
|
||||||
}
|
}
|
||||||
|
|
||||||
gl->ctx_driver->swap_buffers(gl);
|
if (gl->ctx_driver)
|
||||||
|
gl->ctx_driver->swap_buffers(gl);
|
||||||
g_extern.frame_count++;
|
g_extern.frame_count++;
|
||||||
|
|
||||||
#ifdef HAVE_GL_SYNC
|
#ifdef HAVE_GL_SYNC
|
||||||
|
Loading…
x
Reference in New Issue
Block a user