Use gfx_ctx_show_mouse

This commit is contained in:
twinaphex 2015-04-10 08:49:01 +02:00
parent 7e6787147e
commit fe69dc2768
2 changed files with 7 additions and 11 deletions

View File

@ -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)

View File

@ -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)