From 76d24cc42ba9c3d30f33dcb34ebc0a8b772c543f Mon Sep 17 00:00:00 2001 From: twinaphex Date: Tue, 7 Oct 2014 14:33:45 +0200 Subject: [PATCH] (GL) Get rid of some unnecessary conditionals now that context driver is at the very least set to a null driver --- gfx/gl.c | 14 +++++--------- 1 file changed, 5 insertions(+), 9 deletions(-) diff --git a/gfx/gl.c b/gfx/gl.c index a93b9cd0ba..e42ee04980 100644 --- a/gfx/gl.c +++ b/gfx/gl.c @@ -1492,8 +1492,7 @@ static bool gl_frame(void *data, const void *frame, if (gl->should_resize) { 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 if (gl->fbo_inited) @@ -1600,8 +1599,7 @@ static bool gl_frame(void *data, const void *frame, gl_render_overlay(gl); #endif - if (gl->ctx_driver) - gl->ctx_driver->update_window_title(gl); + gl->ctx_driver->update_window_title(gl); 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 && !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); } - if (gl->ctx_driver) - gl->ctx_driver->swap_buffers(gl); + gl->ctx_driver->swap_buffers(gl); g_extern.frame_count++; #ifdef HAVE_GL_SYNC @@ -2460,7 +2456,7 @@ static bool gl_focus(void *data) { gl_t *gl = (gl_t*)data; - if (gl && gl->ctx_driver) + if (gl) return gl->ctx_driver->has_focus(gl); return false; }