(video_texture.c) Don't use video_driver_get_ptr

This commit is contained in:
twinaphex 2015-11-09 00:46:59 +01:00
parent ab651ec09b
commit 44464624e9
2 changed files with 8 additions and 8 deletions

View File

@ -60,7 +60,12 @@ LPDIRECT3DTEXTURE d3d_texture_new(LPDIRECT3DDEVICE dev,
LPDIRECT3DTEXTURE buf;
if (!dev)
return NULL;
{
d3d_video_t *d3d = (d3d_video_t*)video_driver_get_ptr(NULL);
if (!d3d->dev)
return NULL;
dev = d3d->dev;
}
if (path)
hr = D3DXCreateTextureFromFileExA(dev,

View File

@ -39,18 +39,13 @@ static void video_texture_png_load_gl(struct texture_image *ti,
#endif
#ifdef HAVE_D3D
#include "d3d/d3d.h"
#include "d3d/d3d_wrapper.h"
static void video_texture_png_load_d3d(struct texture_image *ti,
enum texture_filter_type filter_type,
uintptr_t *id)
{
d3d_video_t *d3d = (d3d_video_t*)video_driver_get_ptr(NULL);
if (!d3d)
return;
id = (uintptr_t*)d3d_texture_new(d3d->dev, NULL,
id = (uintptr_t*)d3d_texture_new(NULL, NULL,
ti->width, ti->height, 1,
0, D3DFMT_A8R8G8B8, D3DPOOL_MANAGED, 0, 0, 0,
NULL, NULL);