mirror of
https://github.com/libretro/RetroArch
synced 2025-02-21 18:40:09 +00:00
CXX_BUILD fixes
This commit is contained in:
parent
8e3b3762ad
commit
3adb6cc5a8
@ -27,8 +27,6 @@
|
||||
#include "../../configuration.h"
|
||||
#include "../../verbosity.h"
|
||||
|
||||
#include "d3d_common.h"
|
||||
|
||||
#if defined(HAVE_D3D9)
|
||||
#include <d3d9.h>
|
||||
|
||||
@ -57,6 +55,8 @@
|
||||
|
||||
#endif
|
||||
|
||||
#include "d3d_common.h"
|
||||
|
||||
static enum gfx_ctx_api d3d_common_api = GFX_CTX_NONE;
|
||||
|
||||
#ifdef _XBOX
|
||||
|
@ -29,6 +29,10 @@ typedef struct d3d_texture
|
||||
INT32 pool;
|
||||
} d3d_texture_t;
|
||||
|
||||
#ifndef D3DCOLOR_ARGB
|
||||
#define D3DCOLOR_ARGB(_a, _r, _g, _b) ( (DWORD)( ( ( (_a)&0xff)<<24)|( ( (_r)&0xff)<<16)|( ( (_g)&0xff)<<8)|( (_b)&0xff) ) )
|
||||
#endif
|
||||
|
||||
bool d3d_swap(void *data, void *dev);
|
||||
|
||||
void *d3d_vertex_buffer_new(void *dev,
|
||||
|
@ -1659,7 +1659,7 @@ static void d3d9_video_texture_load_d3d(d3d_video_t *d3d,
|
||||
(filter_type == TEXTURE_FILTER_MIPMAP_NEAREST))
|
||||
want_mipmap = true;
|
||||
|
||||
tex = d3d_texture_new(d3d->dev, NULL,
|
||||
tex = (LPDIRECT3DTEXTURE9)d3d_texture_new(d3d->dev, NULL,
|
||||
ti->width, ti->height, 0,
|
||||
usage, d3d_get_argb8888_format(),
|
||||
D3DPOOL_MANAGED, 0, 0, 0,
|
||||
|
@ -14,6 +14,8 @@
|
||||
* If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#include <tchar.h>
|
||||
|
||||
#ifdef HAVE_CONFIG_H
|
||||
#include "../../config.h"
|
||||
#endif
|
||||
@ -22,17 +24,8 @@
|
||||
#include "../common/d3d_common.h"
|
||||
#include "../font_driver.h"
|
||||
|
||||
#ifdef HAVE_D3D9
|
||||
#include <d3d9types.h>
|
||||
#endif
|
||||
|
||||
#ifdef HAVE_D3D8
|
||||
#include <d3d8types.h>
|
||||
#endif
|
||||
|
||||
#include "../../configuration.h"
|
||||
|
||||
#include <tchar.h>
|
||||
|
||||
typedef struct d3dx_font_desc
|
||||
{
|
||||
|
@ -856,14 +856,16 @@ static bool d3d9_cg_renderchain_create_first_pass(
|
||||
{
|
||||
chain->prev.last_width[i] = 0;
|
||||
chain->prev.last_height[i] = 0;
|
||||
chain->prev.vertex_buf[i] = d3d_vertex_buffer_new(
|
||||
chain->prev.vertex_buf[i] = (LPDIRECT3DVERTEXBUFFER9)
|
||||
d3d_vertex_buffer_new(
|
||||
chain->dev, 4 * sizeof(struct CGVertex),
|
||||
D3DUSAGE_WRITEONLY, 0, D3DPOOL_DEFAULT, NULL);
|
||||
|
||||
if (!chain->prev.vertex_buf[i])
|
||||
return false;
|
||||
|
||||
chain->prev.tex[i] = d3d_texture_new(chain->dev, NULL,
|
||||
chain->prev.tex[i] = (LPDIRECT3DTEXTURE9)
|
||||
d3d_texture_new(chain->dev, NULL,
|
||||
info->tex_w, info->tex_h, 1, 0,
|
||||
(fmt == RETRO_PIXEL_FORMAT_RGB565) ?
|
||||
d3d_get_rgb565_format() : d3d_get_xrgb8888_format(),
|
||||
@ -943,7 +945,8 @@ static bool d3d9_cg_renderchain_set_pass_size(
|
||||
pass->info.tex_w = width;
|
||||
pass->info.tex_h = height;
|
||||
pass->pool = D3DPOOL_DEFAULT;
|
||||
pass->tex = d3d_texture_new(chain->dev, NULL,
|
||||
pass->tex = (LPDIRECT3DTEXTURE9)
|
||||
d3d_texture_new(chain->dev, NULL,
|
||||
width, height, 1,
|
||||
D3DUSAGE_RENDERTARGET,
|
||||
chain->passes->data[chain->passes->count - 1].info.pass->fbo.fp_fbo ?
|
||||
@ -1090,14 +1093,15 @@ static bool d3d9_cg_renderchain_add_pass(
|
||||
if (!d3d9_cg_renderchain_init_shader_fvf(chain, &pass))
|
||||
return false;
|
||||
|
||||
pass.vertex_buf = d3d_vertex_buffer_new(chain->dev,
|
||||
pass.vertex_buf = (LPDIRECT3DVERTEXBUFFER9)
|
||||
d3d_vertex_buffer_new(chain->dev,
|
||||
4 * sizeof(struct CGVertex),
|
||||
D3DUSAGE_WRITEONLY, 0, D3DPOOL_DEFAULT, NULL);
|
||||
|
||||
if (!pass.vertex_buf)
|
||||
return false;
|
||||
|
||||
pass.tex = d3d_texture_new(
|
||||
pass.tex = (LPDIRECT3DTEXTURE9)d3d_texture_new(
|
||||
chain->dev,
|
||||
NULL,
|
||||
info->tex_w,
|
||||
@ -1127,7 +1131,8 @@ static bool d3d9_cg_renderchain_add_lut(void *data,
|
||||
{
|
||||
struct lut_info info;
|
||||
cg_renderchain_t *chain = (cg_renderchain_t*)data;
|
||||
LPDIRECT3DTEXTURE9 lut = d3d_texture_new(
|
||||
LPDIRECT3DTEXTURE9 lut = (LPDIRECT3DTEXTURE9)
|
||||
d3d_texture_new(
|
||||
chain->dev,
|
||||
path,
|
||||
D3D_DEFAULT_NONPOW2,
|
||||
|
Loading…
x
Reference in New Issue
Block a user