From f91f543f745ca395bbeaa1f64588a68a38d439da Mon Sep 17 00:00:00 2001 From: twinaphex Date: Thu, 9 Apr 2015 22:47:18 +0200 Subject: [PATCH] (D3D) Start using some of the gfx_ctx wrapper functions --- gfx/d3d/d3d.cpp | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) diff --git a/gfx/d3d/d3d.cpp b/gfx/d3d/d3d.cpp index 8918f45207..76a9e76f2c 100644 --- a/gfx/d3d/d3d.cpp +++ b/gfx/d3d/d3d.cpp @@ -357,12 +357,7 @@ static bool d3d_alive(void *data) static bool d3d_focus(void *data) { - d3d_video_t *d3d = (d3d_video_t*)data; - const gfx_ctx_driver_t *ctx = gfx_ctx_get_ptr(); - - if (d3d && ctx && ctx->has_focus) - return ctx->has_focus(d3d); - return false; + return gfx_ctx_focus(data); } static bool d3d_suppress_screensaver(void *data, bool enable) @@ -1625,8 +1620,7 @@ static bool d3d_frame(void *data, const void *frame, if (d3d && ctx && ctx->update_window_title) ctx->update_window_title(d3d); - if (d3d && ctx && ctx->swap_buffers) - ctx->swap_buffers(d3d); + gfx_ctx_swap_buffers(d3d); return true; }