(D3D) Update d3d_texture_blit
This commit is contained in:
parent
200a301eaa
commit
2d330596b1
|
@ -328,16 +328,10 @@ void d3d_texture_blit(void *data, unsigned pixel_size,
|
||||||
unsigned width, unsigned height, unsigned pitch)
|
unsigned width, unsigned height, unsigned pitch)
|
||||||
{
|
{
|
||||||
unsigned y;
|
unsigned y;
|
||||||
d3d_video_t *d3d = (d3d_video_t*)data;
|
|
||||||
|
|
||||||
(void)y;
|
(void)y;
|
||||||
|
|
||||||
if (!d3d)
|
|
||||||
return;
|
|
||||||
|
|
||||||
#ifdef _XBOX
|
#ifdef _XBOX
|
||||||
/* Set the texture to NULL so D3D doesn't complain about it being in use... */
|
|
||||||
d3d_set_texture(d3d->dev, 0, NULL);
|
|
||||||
D3DTexture_LockRect(tex, 0, lr, NULL, D3DLOCK_NOSYSLOCK);
|
D3DTexture_LockRect(tex, 0, lr, NULL, D3DLOCK_NOSYSLOCK);
|
||||||
#if defined(_XBOX360)
|
#if defined(_XBOX360)
|
||||||
D3DSURFACE_DESC desc;
|
D3DSURFACE_DESC desc;
|
||||||
|
@ -349,7 +343,7 @@ void d3d_texture_blit(void *data, unsigned pixel_size,
|
||||||
{
|
{
|
||||||
const uint8_t *in = (const uint8_t*)frame + y * pitch;
|
const uint8_t *in = (const uint8_t*)frame + y * pitch;
|
||||||
uint8_t *out = (uint8_t*)lr->pBits + y * lr->Pitch;
|
uint8_t *out = (uint8_t*)lr->pBits + y * lr->Pitch;
|
||||||
memcpy(out, in, width * d3d->pixel_size);
|
memcpy(out, in, width * pixel_size);
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
D3DTexture_UnlockRect(tex, 0);
|
D3DTexture_UnlockRect(tex, 0);
|
||||||
|
|
|
@ -223,7 +223,9 @@ static void renderchain_blit_to_texture(void *data, const void *frame,
|
||||||
0, &d3dlr, NULL, d3d->tex_h, D3DLOCK_NOSYSLOCK);
|
0, &d3dlr, NULL, d3d->tex_h, D3DLOCK_NOSYSLOCK);
|
||||||
}
|
}
|
||||||
|
|
||||||
d3d_texture_blit(driver->video_data, 0, d3d->tex,
|
/* Set the texture to NULL so D3D doesn't complain about it being in use... */
|
||||||
|
d3d_set_texture(d3dr, 0, NULL);
|
||||||
|
d3d_texture_blit(driver->video_data, d3d->pixel_size, d3d->tex,
|
||||||
&d3dlr, frame, width, height, pitch);
|
&d3dlr, frame, width, height, pitch);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue