mirror of
https://github.com/reactos/wine.git
synced 2024-11-26 05:00:30 +00:00
- 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).
This commit is contained in:
parent
2696ae4c4b
commit
dd738eab07
@ -451,7 +451,7 @@ create_primary(IDirectDrawImpl* This, LPDDSURFACEDESC2 pDDSD,
|
||||
|
||||
ddsd.dwFlags &= ~DDSD_BACKBUFFERCOUNT;
|
||||
ddsd.ddsCaps.dwCaps &= ~(DDSCAPS_VISIBLE | DDSCAPS_PRIMARYSURFACE
|
||||
| DDSCAPS_BACKBUFFER);
|
||||
| DDSCAPS_BACKBUFFER | DDSCAPS_FRONTBUFFER);
|
||||
|
||||
primary = ICOM_OBJECT(IDirectDrawSurfaceImpl,IDirectDrawSurface7,
|
||||
*ppSurf);
|
||||
|
@ -354,6 +354,7 @@ extern void DDRAW_dump_pixelformat(const DDPIXELFORMAT *in);
|
||||
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 */
|
||||
|
@ -977,7 +977,10 @@ Main_DirectDrawSurface_Lock(LPDIRECTDRAWSURFACE7 iface, LPRECT prect,
|
||||
{
|
||||
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",
|
||||
|
@ -66,7 +66,8 @@ static void DDRAW_dump_flags_(DWORD flags, const flag_info* names,
|
||||
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)
|
||||
@ -326,6 +327,21 @@ void DDRAW_dump_colorkeyflag(DWORD ck)
|
||||
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) {
|
||||
DPRINTF("%ld", *((const DWORD *) in));
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user