mirror of
https://github.com/libretro/RetroArch
synced 2025-01-30 12:32:52 +00:00
Create d3d_device_get_render_target_data
This commit is contained in:
parent
d960cc8c0f
commit
ebe5f65893
@ -391,6 +391,21 @@ void d3d_clear(LPDIRECT3DDEVICE dev,
|
||||
#endif
|
||||
}
|
||||
|
||||
bool d3d_device_get_render_target_data(LPDIRECT3DDEVICE dev,
|
||||
void *_src, void *_dst)
|
||||
{
|
||||
LPDIRECT3DSURFACE src = (LPDIRECT3DSURFACE)_src;
|
||||
LPDIRECT3DSURFACE dst = (LPDIRECT3DSURFACE)_dst;
|
||||
#if defined(HAVE_D3D9) && !defined(__cplusplus)
|
||||
if (SUCCEEDED(IDirect3DDevice9_GetRenderTargetData(dev, src, dst)))
|
||||
return true;
|
||||
#else
|
||||
if (SUCCEEDED(dev->GetRenderTargetData(src, dst)))
|
||||
return true;
|
||||
#endif
|
||||
return false;
|
||||
}
|
||||
|
||||
bool d3d_device_get_render_target(LPDIRECT3DDEVICE dev,
|
||||
unsigned idx, void **data)
|
||||
{
|
||||
|
@ -110,6 +110,9 @@ void d3d_frame_postprocess(void *data);
|
||||
|
||||
void d3d_surface_free(void *data);
|
||||
|
||||
bool d3d_device_get_render_target_data(LPDIRECT3DDEVICE dev,
|
||||
void *_src, void *_dst);
|
||||
|
||||
bool d3d_device_get_render_target(LPDIRECT3DDEVICE dev,
|
||||
unsigned idx, void **data);
|
||||
|
||||
|
@ -1565,7 +1565,7 @@ static bool d3d9_cg_renderchain_read_viewport(
|
||||
goto end;
|
||||
}
|
||||
|
||||
if (FAILED(d3d->d3d_err = d3dr->GetRenderTargetData(target, dest)))
|
||||
if (!d3d_device_get_render_target_data(d3dr, (void*)target, (void*)dest))
|
||||
{
|
||||
ret = false;
|
||||
goto end;
|
||||
|
Loading…
x
Reference in New Issue
Block a user