(D3D) Use gfx_ctx_swap_interval

This commit is contained in:
twinaphex 2015-04-10 08:34:28 +02:00
parent 4cb8074bf5
commit 7e6787147e

View File

@ -323,15 +323,13 @@ static void d3d_calculate_rect(d3d_video_t *d3d,
static void d3d_set_nonblock_state(void *data, bool state) static void d3d_set_nonblock_state(void *data, bool state)
{ {
d3d_video_t *d3d = (d3d_video_t*)data; d3d_video_t *d3d = (d3d_video_t*)data;
const gfx_ctx_driver_t *ctx = gfx_ctx_get_ptr();
if (!d3d) if (!d3d)
return; return;
d3d->video_info.vsync = !state; d3d->video_info.vsync = !state;
if (ctx && ctx->swap_interval) gfx_ctx_swap_interval(d3d, state ? 0 : 1);
ctx->swap_interval(d3d, state ? 0 : 1);
} }
static bool d3d_alive(void *data) static bool d3d_alive(void *data)