[PATCH] UpdateSurface should take into account the offset from the source rectangle. This fixes bugs in a demo app which uses UpdateSurface for animations.
Roderick Colenbrander
thunderbird2k at gmx.net
Sat Sep 20 13:25:44 CDT 2008
---
dlls/wined3d/device.c | 3 ++-
1 files changed, 2 insertions(+), 1 deletions(-)
diff --git a/dlls/wined3d/device.c b/dlls/wined3d/device.c
index 4ca96e6..45469e7 100644
--- a/dlls/wined3d/device.c
+++ b/dlls/wined3d/device.c
@@ -5970,6 +5970,7 @@ static HRESULT WINAPI IWineD3DDeviceImpl_UpdateSurface(IWineD3DDevice *iface,
} else {
+ const unsigned char* data =((const unsigned char *)IWineD3DSurface_GetData(pSourceSurface)) + offset;
glTexSubImage2D(glDescription->target
,glDescription->level
,destLeft
@@ -5978,7 +5979,7 @@ static HRESULT WINAPI IWineD3DDeviceImpl_UpdateSurface(IWineD3DDevice *iface,
,srcHeight
,glDescription->glFormat
,glDescription->glType
- ,IWineD3DSurface_GetData(pSourceSurface)
+ ,data
);
}
}
--
1.5.3.8
--========GMX18421221942894440125--
More information about the wine-patches
mailing list