Stefan Dösinger : ddraw: Fix stupid bug when setting surface client memory.
Alexandre Julliard
julliard at wine.codeweavers.com
Thu May 10 07:49:51 CDT 2007
Module: wine
Branch: master
Commit: 1b94a5eefde0871bc4eacd664a54e295c977f9a8
URL: http://source.winehq.org/git/wine.git/?a=commit;h=1b94a5eefde0871bc4eacd664a54e295c977f9a8
Author: Stefan Dösinger <stefan at codeweavers.com>
Date: Mon May 7 19:42:07 2007 +0200
ddraw: Fix stupid bug when setting surface client memory.
---
dlls/ddraw/surface.c | 15 +++++++--------
1 files changed, 7 insertions(+), 8 deletions(-)
diff --git a/dlls/ddraw/surface.c b/dlls/ddraw/surface.c
index 220444d..d0c93d7 100644
--- a/dlls/ddraw/surface.c
+++ b/dlls/ddraw/surface.c
@@ -2001,12 +2001,6 @@ IDirectDrawSurfaceImpl_SetSurfaceDesc(IDirectDrawSurface7 *iface,
if(!DDSD)
return DDERR_INVALIDPARAMS;
- if (DDSD->dwFlags & DDSD_LPSURFACE && DDSD->lpSurface)
- {
- ERR("Setting the surface memory isn't supported yet\n");
- return DDERR_INVALIDPARAMS;
-
- }
if (DDSD->dwFlags & DDSD_PIXELFORMAT)
{
newFormat = PixelFormat_DD2WineD3D(&DDSD->u4.ddpfPixelFormat);
@@ -2047,14 +2041,19 @@ IDirectDrawSurfaceImpl_SetSurfaceDesc(IDirectDrawSurface7 *iface,
DDCKEY_SRCBLT,
(WINEDDCOLORKEY *) &DDSD->ddckCKSrcBlt);
}
- if (DDSD->dwFlags & DDSD_LPSURFACE)
+ if (DDSD->dwFlags & DDSD_LPSURFACE && DDSD->lpSurface)
{
hr = IWineD3DSurface_SetMem(This->WineD3DSurface, DDSD->lpSurface);
if(hr != WINED3D_OK)
{
/* No need for a trace here, wined3d does that for us */
- return hr;
+ switch(hr)
+ {
+ case WINED3DERR_INVALIDCALL: return DDERR_INVALIDPARAMS;
+ default: break; /* Go on */
+ }
}
+
}
This->surface_desc = *DDSD;
More information about the wine-cvs
mailing list