diff --git a/gfx/d3d/d3d.cpp b/gfx/d3d/d3d.cpp index 01aca84011..50d8e4b2f1 100644 --- a/gfx/d3d/d3d.cpp +++ b/gfx/d3d/d3d.cpp @@ -521,12 +521,11 @@ static bool d3d_construct(d3d_video_t *d3d, #endif #endif - if (d3d && ctx && ctx->show_mouse) - ctx->show_mouse(d3d, !info->fullscreen + gfx_ctx_show_mouse(d3d, !info->fullscreen #ifdef HAVE_OVERLAY - || d3d->overlays_enabled + || d3d->overlays_enabled #endif - ); + ); #ifndef _XBOX @@ -1414,7 +1413,6 @@ static void d3d_overlay_enable(void *data, bool state) { unsigned i; d3d_video_t *d3d = (d3d_video_t*)data; - const gfx_ctx_driver_t *ctx = gfx_ctx_get_ptr(); if (!d3d) return; @@ -1422,8 +1420,7 @@ static void d3d_overlay_enable(void *data, bool state) for (i = 0; i < d3d->overlays.size(); i++) d3d->overlays_enabled = state; - if (d3d && ctx && ctx->show_mouse) - ctx->show_mouse(d3d, state); + gfx_ctx_show_mouse(d3d, state); } static void d3d_overlay_full_screen(void *data, bool enable) diff --git a/gfx/drivers/gl.c b/gfx/drivers/gl.c index 0586809810..b5ae4e5712 100644 --- a/gfx/drivers/gl.c +++ b/gfx/drivers/gl.c @@ -2936,15 +2936,14 @@ static void gl_overlay_vertex_geom(void *data, static void gl_overlay_enable(void *data, bool state) { gl_t *gl = (gl_t*)data; - const gfx_ctx_driver_t *ctx = gfx_ctx_get_ptr(); if (!gl) return; gl->overlay_enable = state; - - if (ctx->show_mouse && gl->fullscreen) - ctx->show_mouse(gl, state); + + if (gl->fullscreen) + gfx_ctx_show_mouse(gl, state); } static void gl_overlay_full_screen(void *data, bool enable)