Make curD3D a static variable

This commit is contained in:
twinaphex 2016-01-07 01:18:51 +01:00
parent e5f327edda
commit 5a60055aa9
2 changed files with 3 additions and 4 deletions

View File

@ -59,7 +59,7 @@ static bool g_quit;
static HWND g_hwnd;
extern void *dinput_wgl;
extern void *curD3D;
static void *curD3D = NULL;
extern void *dinput;
/* Power Request APIs */

View File

@ -45,14 +45,13 @@
static bool widescreen_mode = false;
#endif
void *curD3D = NULL;
void *dinput;
static bool gfx_ctx_d3d_set_resize(void *data, unsigned new_width, unsigned new_height)
{
d3d_video_t *d3d = (d3d_video_t*)curD3D;
d3d_video_t *d3d = (d3d_video_t*)video_driver_get_ptr(false);
if (!d3d->dev)
if (!d3d || !d3d->dev)
return false;
/* No changes? */