mirror of
https://github.com/libretro/RetroArch
synced 2025-01-30 12:32:52 +00:00
(video_texture.c) Don't use video_driver_get_ptr
This commit is contained in:
parent
ab651ec09b
commit
44464624e9
@ -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,
|
||||
|
@ -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);
|
||||
|
Loading…
x
Reference in New Issue
Block a user