wined3d: Fixed a compiler warning.

This commit is contained in:
Alexandre Julliard 2006-05-25 11:09:46 +02:00
parent 5d51d4c87b
commit e8d4c2e674
1 changed files with 2 additions and 2 deletions

View File

@ -588,7 +588,7 @@ HRESULT WINAPI IWineD3DSurfaceImpl_LockRect(IWineD3DSurface *iface, WINED3DLOCKE
if ((This->lockedRect.left == 0 && This->lockedRect.top == 0 && if ((This->lockedRect.left == 0 && This->lockedRect.top == 0 &&
This->lockedRect.right == This->currentDesc.Width This->lockedRect.right == This->currentDesc.Width
&& This->lockedRect.bottom == This->currentDesc.Height)) { && This->lockedRect.bottom == This->currentDesc.Height)) {
char *row, *top, *bottom; BYTE *row, *top, *bottom;
int i; int i;
glReadPixels(0, 0, glReadPixels(0, 0,
@ -606,7 +606,7 @@ HRESULT WINAPI IWineD3DSurfaceImpl_LockRect(IWineD3DSurface *iface, WINED3DLOCKE
return E_OUTOFMEMORY; return E_OUTOFMEMORY;
} }
top = This->resource.allocatedMemory; top = This->resource.allocatedMemory;
bottom = ( (char *) This->resource.allocatedMemory) + pLockedRect->Pitch * ( This->currentDesc.Height - 1); bottom = ( (BYTE *) This->resource.allocatedMemory) + pLockedRect->Pitch * ( This->currentDesc.Height - 1);
for(i = 0; i < This->currentDesc.Height / 2; i++) { for(i = 0; i < This->currentDesc.Height / 2; i++) {
memcpy(row, top, pLockedRect->Pitch); memcpy(row, top, pLockedRect->Pitch);
memcpy(top, bottom, pLockedRect->Pitch); memcpy(top, bottom, pLockedRect->Pitch);