(GL) Get rid of some unnecessary conditionals now that context driver
is at the very least set to a null driver
This commit is contained in:
parent
3603a56c01
commit
76d24cc42b
14
gfx/gl.c
14
gfx/gl.c
|
@ -1492,8 +1492,7 @@ 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;
|
||||||
if (gl->ctx_driver)
|
gl->ctx_driver->set_resize(gl, gl->win_width, gl->win_height);
|
||||||
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,8 +1599,7 @@ static bool gl_frame(void *data, const void *frame,
|
||||||
gl_render_overlay(gl);
|
gl_render_overlay(gl);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
if (gl->ctx_driver)
|
gl->ctx_driver->update_window_title(gl);
|
||||||
gl->ctx_driver->update_window_title(gl);
|
|
||||||
|
|
||||||
RARCH_PERFORMANCE_STOP(frame_run);
|
RARCH_PERFORMANCE_STOP(frame_run);
|
||||||
|
|
||||||
|
@ -1644,13 +1642,11 @@ 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)
|
||||||
{
|
{
|
||||||
if (gl->ctx_driver)
|
gl->ctx_driver->swap_buffers(gl);
|
||||||
gl->ctx_driver->swap_buffers(gl);
|
|
||||||
glClear(GL_COLOR_BUFFER_BIT);
|
glClear(GL_COLOR_BUFFER_BIT);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (gl->ctx_driver)
|
gl->ctx_driver->swap_buffers(gl);
|
||||||
gl->ctx_driver->swap_buffers(gl);
|
|
||||||
g_extern.frame_count++;
|
g_extern.frame_count++;
|
||||||
|
|
||||||
#ifdef HAVE_GL_SYNC
|
#ifdef HAVE_GL_SYNC
|
||||||
|
@ -2460,7 +2456,7 @@ static bool gl_focus(void *data)
|
||||||
{
|
{
|
||||||
gl_t *gl = (gl_t*)data;
|
gl_t *gl = (gl_t*)data;
|
||||||
|
|
||||||
if (gl && gl->ctx_driver)
|
if (gl)
|
||||||
return gl->ctx_driver->has_focus(gl);
|
return gl->ctx_driver->has_focus(gl);
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue