mirror of
https://github.com/CTCaer/RetroArch.git
synced 2024-12-20 01:38:12 +00:00
Convert to C
This commit is contained in:
parent
d23d742439
commit
6c262fe44f
@ -68,13 +68,13 @@ bool d3d_texture_get_surface_level(LPDIRECT3DTEXTURE tex,
|
||||
if (!tex)
|
||||
return false;
|
||||
#if defined(HAVE_D3D9) && !defined(__cplusplus)
|
||||
if (SUCCEEDED(IDirect3DTexture9_GetSurfaceLevel(tex, idx, (LPDIRECT3DSURFACE**)_ppsurface_level)))
|
||||
if (SUCCEEDED(IDirect3DTexture9_GetSurfaceLevel(tex, idx, (IDirect3DSurface9**)_ppsurface_level)))
|
||||
return true;
|
||||
#elif defined(HAVE_D3D9) && !defined(__cplusplus)
|
||||
if (SUCCEEDED(IDirect3DTexture9_GetSurfaceLevel(tex, idx, (LPDIRECT3DSURFACE**)_ppsurface_level)))
|
||||
#elif defined(HAVE_D3D8) && !defined(__cplusplus)
|
||||
if (SUCCEEDED(IDirect3DTexture8_GetSurfaceLevel(tex, idx, (LPDIRECT3DSURFACE**)_ppsurface_level)))
|
||||
return true;
|
||||
#else
|
||||
if (SUCCEEDED(tex->GetSurfaceLevel(level, (LPDIRECT3DSURFACE**)_ppsurface_level)))
|
||||
if (SUCCEEDED(tex->GetSurfaceLevel(idx, (LPDIRECT3DSURFACE**)_ppsurface_level)))
|
||||
return true;
|
||||
#endif
|
||||
return false;
|
||||
|
@ -783,8 +783,7 @@ static bool d3d9_cg_renderchain_init_shader(void *data,
|
||||
return false;
|
||||
}
|
||||
|
||||
HRESULT ret = cgD3D9SetDevice((IDirect3DDevice9*)d3d->dev);
|
||||
if (FAILED(ret))
|
||||
if (FAILED(cgD3D9SetDevice((IDirect3DDevice9*)d3d->dev)))
|
||||
return false;
|
||||
return true;
|
||||
}
|
||||
@ -1021,15 +1020,15 @@ static void d3d_recompute_pass_sizes(cg_renderchain_t *chain,
|
||||
{
|
||||
unsigned i;
|
||||
struct LinkInfo link_info = {0};
|
||||
link_info.pass = &d3d->shader.pass[0];
|
||||
link_info.tex_w = link_info.tex_h =
|
||||
d3d->video_info.input_scale * RARCH_SCALE_BASE;
|
||||
|
||||
unsigned current_width = link_info.tex_w;
|
||||
unsigned current_height = link_info.tex_h;
|
||||
unsigned current_width = d3d->video_info.input_scale * RARCH_SCALE_BASE;
|
||||
unsigned current_height = d3d->video_info.input_scale * RARCH_SCALE_BASE;
|
||||
unsigned out_width = 0;
|
||||
unsigned out_height = 0;
|
||||
|
||||
link_info.pass = &d3d->shader.pass[0];
|
||||
link_info.tex_w = current_width;
|
||||
link_info.tex_h = current_height;
|
||||
|
||||
if (!d3d9_cg_renderchain_set_pass_size(chain, 0,
|
||||
current_width, current_height))
|
||||
{
|
||||
|
@ -317,6 +317,15 @@ VIDEO DRIVER
|
||||
#if defined(HAVE_D3D8)
|
||||
#include "../gfx/drivers_renderchain/d3d8_renderchain.c"
|
||||
#endif
|
||||
|
||||
#if defined(HAVE_D3D9)
|
||||
|
||||
#ifdef HAVE_CG
|
||||
#include "../gfx/drivers_renderchain/d3d9_cg_renderchain.c"
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
||||
#if defined(GEKKO)
|
||||
|
@ -137,10 +137,6 @@ VIDEO DRIVER
|
||||
#include "../gfx/drivers_renderchain/d3d9_hlsl_renderchain.cpp"
|
||||
#endif
|
||||
|
||||
#ifdef HAVE_CG
|
||||
#include "../gfx/drivers_renderchain/d3d9_cg_renderchain.cpp"
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
||||
#ifdef HAVE_VULKAN
|
||||
|
Loading…
Reference in New Issue
Block a user