(D3D) Move ifndef XBOX functionality to D3D context driver

This commit is contained in:
twinaphex 2014-06-08 04:29:25 +02:00
parent bf4dbede7a
commit 4320efa9a1
3 changed files with 3 additions and 8 deletions

View File

@ -432,15 +432,16 @@ static void gfx_ctx_d3d_get_video_size(void *data, unsigned *width, unsigned *he
static void gfx_ctx_d3d_swap_interval(void *data, unsigned interval)
{
(void)data;
#ifdef _XBOX
d3d_video_t *d3d = (d3d_video_t*)data;
#ifdef _XBOX
LPDIRECT3DDEVICE d3dr = d3d->dev;
if (interval)
d3dr->SetRenderState(XBOX_PRESENTATIONINTERVAL, D3DPRESENT_INTERVAL_ONE);
else
d3dr->SetRenderState(XBOX_PRESENTATIONINTERVAL, D3DPRESENT_INTERVAL_IMMEDIATE);
#else
d3d_restore(d3d);
#endif
}

View File

@ -794,9 +794,6 @@ static void d3d_set_nonblock_state(void *data, bool state)
if (d3d->ctx_driver && d3d->ctx_driver->swap_interval)
d3d->ctx_driver->swap_interval(d3d, state ? 0 : 1);
#ifndef _XBOX
d3d_restore(d3d);
#endif
}
static bool d3d_alive(void *data)

View File

@ -948,9 +948,6 @@ static void d3d_set_nonblock_state(void *data, bool state)
if (d3d->ctx_driver && d3d->ctx_driver->swap_interval)
d3d->ctx_driver->swap_interval(d3d, state ? 0 : 1);
#ifndef _XBOX
d3d_restore(d3d);
#endif
}
static bool d3d_alive(void *data)