Hi all, This patch has three small 'fixes' described in the Changelog. It has been generated from a tree having the last two DDraw patches applied. Changelog: - prevent the backbuffer to also have the frontbuffer flag set - log the Locking flags - print symbolic name (if any) of zero values for bit fields (thanks Andi) -- Lionel Ulmer - http://www.bbrox.org/
--- ../wine_work_base/dlls/ddraw/ddraw_private.h Sat Nov 23 20:45:28 2002 +++ dlls/ddraw/ddraw_private.h Sat Nov 23 23:47:16 2002 @@ -354,6 +354,7 @@ extern void DDRAW_dump_colorkeyflag(DWORD ck); extern void DDRAW_dump_surface_desc(const DDSURFACEDESC2 *lpddsd); extern void DDRAW_dump_cooperativelevel(DWORD cooplevel); +extern void DDRAW_dump_lockflag(DWORD lockflag); extern void DDRAW_dump_DDCOLORKEY(const DDCOLORKEY *in); extern void DDRAW_dump_DDCAPS(const DDCAPS *lpcaps); #endif /* __WINE_DLLS_DDRAW_DDRAW_PRIVATE_H */ --- ../wine_work_base/dlls/ddraw/helper.c Mon Nov 18 21:36:17 2002 +++ dlls/ddraw/helper.c Sat Nov 23 23:50:42 2002 @@ -66,7 +66,8 @@ unsigned int i; for (i=0; i < num_names; i++) - if (names[i].val & flags) + if ((flags & names[i].val) || /* standard flag value */ + ((!flags) && (!names[i].val))) /* zero value only */ DPRINTF("%s ", names[i].name); if (newline) @@ -324,6 +325,21 @@ }; DDRAW_dump_flags(ck, flags, sizeof(flags)/sizeof(flags[0])); +} + +void DDRAW_dump_lockflag(DWORD lockflag) +{ + static const flag_info flags[] = + { + FE(DDLOCK_SURFACEMEMORYPTR), + FE(DDLOCK_WAIT), + FE(DDLOCK_EVENT), + FE(DDLOCK_READONLY), + FE(DDLOCK_WRITEONLY), + FE(DDLOCK_NOSYSLOCK) + }; + + DDRAW_dump_flags(lockflag, flags, sizeof(flags)/sizeof(flags[0])); } static void DDRAW_dump_DWORD(const void *in) { --- ../wine_work_base/dlls/ddraw/ddraw/main.c Sat Nov 23 20:45:29 2002 +++ dlls/ddraw/ddraw/main.c Sat Nov 23 23:38:27 2002 @@ -451,7 +451,7 @@ ddsd.dwFlags &= ~DDSD_BACKBUFFERCOUNT; ddsd.ddsCaps.dwCaps &= ~(DDSCAPS_VISIBLE | DDSCAPS_PRIMARYSURFACE - | DDSCAPS_BACKBUFFER); + | DDSCAPS_BACKBUFFER | DDSCAPS_FRONTBUFFER); primary = ICOM_OBJECT(IDirectDrawSurfaceImpl,IDirectDrawSurface7, *ppSurf); --- ../wine_work_base/dlls/ddraw/dsurface/main.c Sat Nov 23 20:45:29 2002 +++ dlls/ddraw/dsurface/main.c Sat Nov 23 23:48:21 2002 @@ -977,7 +977,10 @@ { ICOM_THIS(IDirectDrawSurfaceImpl, iface); - TRACE("(%p)->Lock(%p,%p,%08lx,%08lx)\n",This,prect,pDDSD,flags,(DWORD)h); + if (TRACE_ON(ddraw)) { + TRACE("(%p)->Lock(%p,%p,%08lx,%08lx)\n",This,prect,pDDSD,flags,(DWORD)h); + TRACE(" - locking flags : "); DDRAW_dump_lockflag(flags); + } if (flags & ~(DDLOCK_WAIT|DDLOCK_READONLY|DDLOCK_WRITEONLY)) WARN("(%p)->Lock(%p,%p,%08lx,%08lx)\n",