Module: wine Branch: master Commit: 4d9c3151c332a0d21a63f522ae4e9a1b5be6aecd URL: http://source.winehq.org/git/wine.git/?a=commit;h=4d9c3151c332a0d21a63f522ae...
Author: Henri Verbeet hverbeet@codeweavers.com Date: Tue Nov 26 10:41:49 2013 +0100
ddraw: Don't bother setting *surface to NULL in CreateSurface().
None of the callers depend on this.
---
dlls/ddraw/ddraw.c | 16 +++++++--------- 1 files changed, 7 insertions(+), 9 deletions(-)
diff --git a/dlls/ddraw/ddraw.c b/dlls/ddraw/ddraw.c index 88e220e..e3373a9 100644 --- a/dlls/ddraw/ddraw.c +++ b/dlls/ddraw/ddraw.c @@ -2856,12 +2856,11 @@ static HRESULT CreateSurface(struct ddraw *ddraw, DDSURFACEDESC2 *DDSD, DDSD->dwFlags &= ~DDSD_LPSURFACE; }
- if((DDSD->ddsCaps.dwCaps & (DDSCAPS_FLIP | DDSCAPS_PRIMARYSURFACE)) == (DDSCAPS_FLIP | DDSCAPS_PRIMARYSURFACE) && - !(ddraw->cooperative_level & DDSCL_EXCLUSIVE)) + if ((DDSD->ddsCaps.dwCaps & (DDSCAPS_FLIP | DDSCAPS_PRIMARYSURFACE)) + == (DDSCAPS_FLIP | DDSCAPS_PRIMARYSURFACE) + && !(ddraw->cooperative_level & DDSCL_EXCLUSIVE)) { - TRACE("(%p): Attempt to create a flipable primary surface without DDSCL_EXCLUSIVE set\n", - ddraw); - *surface = NULL; + WARN("Attempted to create a flipable primary surface without DDSCL_EXCLUSIVE.\n"); return DDERR_NOEXCLUSIVEMODE; }
@@ -2871,11 +2870,10 @@ static HRESULT CreateSurface(struct ddraw *ddraw, DDSURFACEDESC2 *DDSD, return DDERR_INVALIDCAPS; }
- if((DDSD->ddsCaps.dwCaps & sysvidmem) == sysvidmem) + /* This is a special case in ddrawex, but not allowed in ddraw. */ + if ((DDSD->ddsCaps.dwCaps & sysvidmem) == sysvidmem) { - /* This is a special switch in ddrawex.dll, but not allowed in ddraw.dll */ - WARN("Application tries to put the surface in both system and video memory\n"); - *surface = NULL; + WARN("Tried to create a surface in both system and video memory.\n"); return DDERR_INVALIDCAPS; }