(GL) Go through gfx_ctx_get_ptr

This commit is contained in:
twinaphex 2015-04-09 18:30:30 +02:00
parent 73bfdfccdb
commit 5d60938560

View File

@ -366,13 +366,12 @@ typedef struct gl
static INLINE void context_bind_hw_render(gl_t *gl, bool enable)
{
driver_t *driver = driver_get_ptr();
const gfx_ctx_driver_t *ctx_driver = driver ? (const gfx_ctx_driver_t*)driver->video_context : NULL;
const gfx_ctx_driver_t *ctx = gfx_ctx_get_ptr();
if (!gl)
return;
if (gl->shared_context_use && ctx_driver->bind_hw_render)
ctx_driver->bind_hw_render(gl, enable);
if (gl->shared_context_use && ctx->bind_hw_render)
ctx->bind_hw_render(gl, enable);
}
static INLINE bool gl_check_error(void)