diff --git a/gfx/d3d9/d3d9.hpp b/gfx/d3d9/d3d9.hpp index 396a7a3451..33db6d725d 100644 --- a/gfx/d3d9/d3d9.hpp +++ b/gfx/d3d9/d3d9.hpp @@ -31,18 +31,10 @@ #include #include #endif +#include "d3d_defines.h" #include #include -#define LPDIRECT3D LPDIRECT3D9 -#define LPDIRECT3DDEVICE LPDIRECT3DDEVICE9 -#define LPDIRECT3DTEXTURE LPDIRECT3DTEXTURE9 -#define LPDIRECT3DVERTEXBUFFER LPDIRECT3DVERTEXBUFFER9 -#define LPDIRECT3DSURFACE LPDIRECT3DSURFACE9 -#define LPDIRECT3DVERTEXDECLARATION LPDIRECT3DVERTEXDECLARATION9 -#define D3DVERTEXELEMENT D3DVERTEXELEMENT9 -#define D3DVIEWPORT D3DVIEWPORT9 - class RenderChain; typedef struct diff --git a/gfx/d3d9/d3d_defines.h b/gfx/d3d9/d3d_defines.h new file mode 100644 index 0000000000..c0311a5731 --- /dev/null +++ b/gfx/d3d9/d3d_defines.h @@ -0,0 +1,31 @@ +/* RetroArch - A frontend for libretro. + * Copyright (C) 2010-2013 - Hans-Kristian Arntzen + * Copyright (C) 2011-2013 - Daniel De Matteis + * + * RetroArch is free software: you can redistribute it and/or modify it under the terms + * of the GNU General Public License as published by the Free Software Found- + * ation, either version 3 of the License, or (at your option) any later version. + * + * RetroArch is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; + * without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR + * PURPOSE. See the GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License along with RetroArch. + * If not, see . + */ + +#ifndef D3DVIDEO_DEFINES_H +#define D3DVIDEO_DEFINES_H + +#define LPDIRECT3D LPDIRECT3D9 +#define LPDIRECT3DDEVICE LPDIRECT3DDEVICE9 +#define LPDIRECT3DTEXTURE LPDIRECT3DTEXTURE9 +#define LPDIRECT3DVERTEXBUFFER LPDIRECT3DVERTEXBUFFER9 +#define LPDIRECT3DVERTEXSHADER LPDIRECT3DVERTEXSHADER9 +#define LPDIRECT3DPIXELSHADER LPDIRECT3DPIXELSHADER9 +#define LPDIRECT3DSURFACE LPDIRECT3DSURFACE9 +#define LPDIRECT3DVERTEXDECLARATION LPDIRECT3DVERTEXDECLARATION9 +#define D3DVERTEXELEMENT D3DVERTEXELEMENT9 +#define D3DVIEWPORT D3DVIEWPORT9 + +#endif diff --git a/gfx/d3d9/render_chain.hpp b/gfx/d3d9/render_chain.hpp index f0efb3dcef..5496f34d56 100644 --- a/gfx/d3d9/render_chain.hpp +++ b/gfx/d3d9/render_chain.hpp @@ -103,7 +103,7 @@ class RenderChain #endif unsigned last_width, last_height; - IDirect3DVertexDeclaration9 *vertex_decl; + LPDIRECT3DVERTEXDECLARATION vertex_decl; std::vector attrib_map; }; std::vector passes; diff --git a/gfx/shader_hlsl.c b/gfx/shader_hlsl.c index 366777442c..a9080fd4be 100644 --- a/gfx/shader_hlsl.c +++ b/gfx/shader_hlsl.c @@ -64,8 +64,8 @@ static const char *stock_hlsl_program = struct hlsl_program { - IDirect3DVertexShader9 *vprg; - IDirect3DPixelShader9 *fprg; + LPDIRECT3DVERTEXSHADER vprg; + LPDIRECT3DPIXELSHADER fprg; D3DXHANDLE vid_size_f; D3DXHANDLE tex_size_f; D3DXHANDLE out_size_f; @@ -82,7 +82,7 @@ struct hlsl_program XMMATRIX mvp_val; /* TODO: Move to D3DXMATRIX here */ }; -static IDirect3DDevice9 *d3d_device_ptr; +static LPDIRECT3DDEVICE d3d_device_ptr; static struct hlsl_program prg[RARCH_HLSL_MAX_SHADERS] = {0}; static bool hlsl_active = false; static unsigned active_index = 0; diff --git a/xdk/xdk_d3d.h b/xdk/xdk_d3d.h index 596bcaf7e0..dbfc560fdc 100644 --- a/xdk/xdk_d3d.h +++ b/xdk/xdk_d3d.h @@ -63,9 +63,9 @@ typedef struct xdk_d3d_video LPDIRECT3DVERTEXBUFFER vertex_buf; LPDIRECT3DTEXTURE lpTexture; #ifdef HAVE_D3D9 - D3DTexture lpTexture_ot_as16srgb; + LPDIRECT3DTEXTURE lpTexture_ot_as16srgb; LPDIRECT3DTEXTURE lpTexture_ot; - IDirect3DVertexDeclaration9* v_decl; + LPDIRECT3DVERTEXDECLARATION v_decl; #endif #ifdef HAVE_MENU bool rgui_texture_enable; diff --git a/xdk/xdk_defines.h b/xdk/xdk_defines.h index e4d1b5744a..566481f0be 100644 --- a/xdk/xdk_defines.h +++ b/xdk/xdk_defines.h @@ -34,7 +34,6 @@ #define D3DVERTEXELEMENT D3DVERTEXELEMENT8 #define direct3d_create_ctx Direct3DCreate8 -#define IDirect3DVertexBuffer IDirect3DVertexBuffer8 #define SetSamplerState_function(device, sampler, type, value) \ D3D__DirtyFlags |= (D3DDIRTYFLAG_TEXTURE_STATE_0 << sampler); \ @@ -77,7 +76,6 @@ #define D3DVERTEXELEMENT D3DVERTEXELEMENT9 #define direct3d_create_ctx Direct3DCreate9 -#define IDirect3DVertexDeclaration IDirect3DVertexDeclaration9 #define RD3DVertexBuffer_Lock(device, OffsetToLock, SizeToLock, ppbData, Flags) *ppbData = D3DVertexBuffer_Lock(device, OffsetToLock, SizeToLock, Flags) #define RD3DVertexBuffer_Unlock(device) D3DVertexBuffer_Unlock(device)