mirror of
https://github.com/libretro/RetroArch
synced 2025-03-29 22:20:21 +00:00
(D3D) Build fixes for lock_rectangle_clear wrapper function
This commit is contained in:
parent
f778d36272
commit
c1118dc12a
@ -139,18 +139,18 @@ void d3d_draw_primitive(LPDIRECT3DDEVICE dev,
|
||||
|
||||
void d3d_lockrectangle_clear(void *data,
|
||||
LPDIRECT3DTEXTURE tex,
|
||||
unsigned level, D3DLOCKED_RECT lock_rect, RECT rect,
|
||||
unsigned level, D3DLOCKED_RECT lock_rect, RECT *rect,
|
||||
unsigned flags)
|
||||
{
|
||||
#if defined(_XBOX)
|
||||
d3d_video_t *chain = (d3d_video_t*)data;
|
||||
D3DTexture_LockRect(tex, level, &lock_rect, &rect, flags);
|
||||
D3DTexture_LockRect(tex, level, &lock_rect, rect, flags);
|
||||
memset(lock_rect.pBits, 0, chain->tex_h * lock_rect.Pitch);
|
||||
#else
|
||||
renderchain_t *chain = (renderchain_t*)data;
|
||||
if (SUCCEEDED(tex->LockRect(level, &lock_rect, &rect, flags)))
|
||||
Pass *pass = (Pass*)data;
|
||||
if (SUCCEEDED(tex->LockRect(level, &lock_rect, rect, flags)))
|
||||
{
|
||||
memset(lock_rect.pBits, level, tex_height * lock_rect.Pitch);
|
||||
memset(lock_rect.pBits, level, pass->info.tex_h * lock_rect.Pitch);
|
||||
tex->UnlockRect(0);
|
||||
}
|
||||
#endif
|
||||
|
@ -47,7 +47,7 @@ void d3d_draw_primitive(LPDIRECT3DDEVICE dev,
|
||||
|
||||
void d3d_lockrectangle_clear(void *data,
|
||||
LPDIRECT3DTEXTURE tex,
|
||||
unsigned level, D3DLOCKED_RECT lock_rect, RECT rect,
|
||||
unsigned level, D3DLOCKED_RECT lock_rect, RECT *rect,
|
||||
unsigned flags);
|
||||
|
||||
void d3d_set_texture(LPDIRECT3DDEVICE dev, unsigned sampler,
|
||||
|
@ -531,17 +531,17 @@ void renderchain_blit_to_texture(void *data, const void *frame,
|
||||
D3DSURFACE_DESC desc;
|
||||
D3DLOCKED_RECT d3dlr;
|
||||
renderchain_t *chain = (renderchain_t*)data;
|
||||
Pass &first = chain->passes[0];
|
||||
Pass *first = (Pass*)&chain->passes[0];
|
||||
|
||||
(void)desc;
|
||||
|
||||
if (first.last_width != width || first.last_height != height)
|
||||
if (first->last_width != width || first->last_height != height)
|
||||
{
|
||||
d3d_lockrectangle_clear(first, first.tex, 0, d3dlr,
|
||||
d3d_lockrectangle_clear(first, first->tex, 0, d3dlr,
|
||||
NULL, D3DLOCK_NOSYSLOCK);
|
||||
}
|
||||
|
||||
d3d_texture_blit(driver.video_data, chain, first.tex,
|
||||
d3d_texture_blit(driver.video_data, chain, first->tex,
|
||||
desc, d3dlr, frame, width, height, pitch);
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user