(D3D) Move D3DTexture_LockRect to d3d_texture_blit
This commit is contained in:
parent
7366b43588
commit
c558b48ff5
|
@ -269,6 +269,8 @@ void d3d_texture_blit(void *data, void *renderchain_data,
|
||||||
if (!d3d)
|
if (!d3d)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
|
#ifdef _XBOX
|
||||||
|
D3DTexture_LockRect(tex, 0, &lr, NULL, D3DLOCK_NOSYSLOCK);
|
||||||
#if defined(_XBOX360)
|
#if defined(_XBOX360)
|
||||||
D3DSURFACE_DESC desc;
|
D3DSURFACE_DESC desc;
|
||||||
tex->GetLevelDesc(0, &desc);
|
tex->GetLevelDesc(0, &desc);
|
||||||
|
@ -281,6 +283,7 @@ void d3d_texture_blit(void *data, void *renderchain_data,
|
||||||
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 * d3d->pixel_size);
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
#else
|
#else
|
||||||
renderchain_t *chain = (renderchain_t*)renderchain_data;
|
renderchain_t *chain = (renderchain_t*)renderchain_data;
|
||||||
|
|
||||||
|
|
|
@ -262,6 +262,6 @@ static void renderchain_blit_to_texture(void *data, const void *frame,
|
||||||
0, &d3dlr, NULL, D3DLOCK_NOSYSLOCK);
|
0, &d3dlr, NULL, D3DLOCK_NOSYSLOCK);
|
||||||
}
|
}
|
||||||
|
|
||||||
D3DTexture_LockRect(d3d->tex, 0, &d3dlr, NULL, D3DLOCK_NOSYSLOCK);
|
d3d_texture_blit(driver.video_data, NULL, d3d->tex,
|
||||||
d3d_texture_blit(d3d, NULL, d3d->tex, &d3dlr, frame, width, height, pitch);
|
&d3dlr, frame, width, height, pitch);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue