From 29584b996033dd4359162ab1f723524cd258d841 Mon Sep 17 00:00:00 2001 From: libretroadmin Date: Wed, 31 May 2023 19:43:20 +0200 Subject: [PATCH] Move d3d8_texture_new to d3d8.c and make it static --- gfx/common/d3d8_common.c | 16 ---------------- gfx/common/d3d8_common.h | 7 ------- gfx/drivers/d3d8.c | 16 ++++++++++++++++ 3 files changed, 16 insertions(+), 23 deletions(-) diff --git a/gfx/common/d3d8_common.c b/gfx/common/d3d8_common.c index 245742328e..3b958d7950 100644 --- a/gfx/common/d3d8_common.c +++ b/gfx/common/d3d8_common.c @@ -95,22 +95,6 @@ void d3d8_deinitialize_symbols(void) #endif } -void *d3d8_texture_new(LPDIRECT3DDEVICE8 dev, - unsigned width, unsigned height, - unsigned miplevels, unsigned usage, INT32 format, - INT32 pool, unsigned filter, unsigned mipfilter, - INT32 color_key, void *src_info_data, - PALETTEENTRY *palette, bool want_mipmap) -{ - void *buf = NULL; - if (SUCCEEDED(IDirect3DDevice8_CreateTexture(dev, - width, height, miplevels, usage, - (D3DFORMAT)format, (D3DPOOL)pool, - (struct IDirect3DTexture8**)&buf))) - return buf; - return NULL; -} - static bool d3d8_create_device_internal( LPDIRECT3DDEVICE8 dev, D3DPRESENT_PARAMETERS *d3dpp, diff --git a/gfx/common/d3d8_common.h b/gfx/common/d3d8_common.h index bf3bf684fb..e351b9c278 100644 --- a/gfx/common/d3d8_common.h +++ b/gfx/common/d3d8_common.h @@ -81,13 +81,6 @@ d3d8_vertex_buffer_lock(LPDIRECT3DVERTEXBUFFER8 vertbuf) return buf; } -void *d3d8_texture_new(LPDIRECT3DDEVICE8 dev, - unsigned width, unsigned height, - unsigned miplevels, unsigned usage, INT32 format, - INT32 pool, unsigned filter, unsigned mipfilter, - INT32 color_key, void *src_info_data, - PALETTEENTRY *palette, bool want_mipmap); - bool d3d8_create_device(void *dev, void *d3dpp, LPDIRECT3D8 d3d, diff --git a/gfx/drivers/d3d8.c b/gfx/drivers/d3d8.c index bf02a313f5..e18f07a866 100644 --- a/gfx/drivers/d3d8.c +++ b/gfx/drivers/d3d8.c @@ -96,6 +96,22 @@ struct d3d8_texture_info enum texture_filter_type type; }; +static void *d3d8_texture_new(LPDIRECT3DDEVICE8 dev, + unsigned width, unsigned height, + unsigned miplevels, unsigned usage, INT32 format, + INT32 pool, unsigned filter, unsigned mipfilter, + INT32 color_key, void *src_info_data, + PALETTEENTRY *palette, bool want_mipmap) +{ + void *buf = NULL; + if (SUCCEEDED(IDirect3DDevice8_CreateTexture(dev, + width, height, miplevels, usage, + (D3DFORMAT)format, (D3DPOOL)pool, + (struct IDirect3DTexture8**)&buf))) + return buf; + return NULL; +} + void d3d8_set_mvp(void *data, const void *mat_data) { struct d3d_matrix matrix;