mirror of
https://github.com/libretro/RetroArch
synced 2025-04-07 13:23:32 +00:00
(D3D9) Cleanup
This commit is contained in:
parent
febd584930
commit
52bb930cc7
@ -254,26 +254,6 @@ void d3d9_deinitialize_symbols(void)
|
|||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef HAVE_D3DX
|
|
||||||
static void *d3d9_texture_new_from_file(
|
|
||||||
void *dev,
|
|
||||||
const char *path, unsigned width, unsigned height,
|
|
||||||
unsigned miplevels, unsigned usage, D3DFORMAT format,
|
|
||||||
INT32 pool, unsigned filter, unsigned mipfilter,
|
|
||||||
INT32 color_key, void *src_info_data,
|
|
||||||
PALETTEENTRY *palette)
|
|
||||||
{
|
|
||||||
void *buf = NULL;
|
|
||||||
if (FAILED(D3D9CreateTextureFromFile((LPDIRECT3DDEVICE9)dev,
|
|
||||||
path, width, height, miplevels, usage, format,
|
|
||||||
(D3DPOOL)pool, filter, mipfilter, color_key,
|
|
||||||
(D3DXIMAGE_INFO*)src_info_data,
|
|
||||||
palette, (struct IDirect3DTexture9**)&buf)))
|
|
||||||
return NULL;
|
|
||||||
return buf;
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
|
|
||||||
void *d3d9_texture_new(void *_dev,
|
void *d3d9_texture_new(void *_dev,
|
||||||
const char *path, unsigned width, unsigned height,
|
const char *path, unsigned width, unsigned height,
|
||||||
unsigned miplevels, unsigned usage, INT32 format,
|
unsigned miplevels, unsigned usage, INT32 format,
|
||||||
@ -287,14 +267,15 @@ void *d3d9_texture_new(void *_dev,
|
|||||||
if (path)
|
if (path)
|
||||||
{
|
{
|
||||||
#ifdef HAVE_D3DX
|
#ifdef HAVE_D3DX
|
||||||
return d3d9_texture_new_from_file(_dev,
|
void *buf = NULL;
|
||||||
path, width, height, miplevels,
|
if (SUCCEEDED(D3D9CreateTextureFromFile((LPDIRECT3DDEVICE9)dev,
|
||||||
usage, (D3DFORMAT)format,
|
path, width, height, miplevels, usage, format,
|
||||||
(D3DPOOL)pool, filter, mipfilter,
|
(D3DPOOL)pool, filter, mipfilter, color_key,
|
||||||
color_key, src_info_data, palette);
|
(D3DXIMAGE_INFO*)src_info_data,
|
||||||
#else
|
palette, (struct IDirect3DTexture9**)&buf)))
|
||||||
return NULL;
|
return buf;
|
||||||
#endif
|
#endif
|
||||||
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifndef _XBOX
|
#ifndef _XBOX
|
||||||
|
Loading…
x
Reference in New Issue
Block a user