(D3D) Move D3DTexture_LockRect to d3d_texture_blit

This commit is contained in:
twinaphex 2014-09-13 19:11:36 +02:00
parent 7366b43588
commit c558b48ff5
2 changed files with 5 additions and 2 deletions

View File

@ -269,6 +269,8 @@ void d3d_texture_blit(void *data, void *renderchain_data,
if (!d3d)
return;
#ifdef _XBOX
D3DTexture_LockRect(tex, 0, &lr, NULL, D3DLOCK_NOSYSLOCK);
#if defined(_XBOX360)
D3DSURFACE_DESC 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;
memcpy(out, in, width * d3d->pixel_size);
}
#endif
#else
renderchain_t *chain = (renderchain_t*)renderchain_data;

View File

@ -262,6 +262,6 @@ static void renderchain_blit_to_texture(void *data, const void *frame,
0, &d3dlr, NULL, D3DLOCK_NOSYSLOCK);
}
D3DTexture_LockRect(d3d->tex, 0, &d3dlr, NULL, D3DLOCK_NOSYSLOCK);
d3d_texture_blit(d3d, NULL, d3d->tex, &d3dlr, frame, width, height, pitch);
d3d_texture_blit(driver.video_data, NULL, d3d->tex,
&d3dlr, frame, width, height, pitch);
}