diff options
Diffstat (limited to 'xorg-server/hw/xwin/winshaddd.c')
-rw-r--r-- | xorg-server/hw/xwin/winshaddd.c | 64 |
1 files changed, 11 insertions, 53 deletions
diff --git a/xorg-server/hw/xwin/winshaddd.c b/xorg-server/hw/xwin/winshaddd.c index 833444177..a7ee92802 100644 --- a/xorg-server/hw/xwin/winshaddd.c +++ b/xorg-server/hw/xwin/winshaddd.c @@ -42,25 +42,8 @@ */ extern HWND g_hDlgExit; -extern char *g_pszLogFile; +extern const char *g_pszLogFile; -/* - * FIXME: Headers are broken, DEFINE_GUID doesn't work correctly, - * so we have to redefine it here. - */ -#ifdef DEFINE_GUID -#undef DEFINE_GUID -#define DEFINE_GUID(n,l,w1,w2,b1,b2,b3,b4,b5,b6,b7,b8) const GUID n GUID_SECT = {l,w1,w2,{b1,b2,b3,b4,b5,b6,b7,b8}} -#endif /* DEFINE_GUID */ - - -/* - * FIXME: Headers are broken, IID_IDirectDraw4 has to be defined - * here manually. Should be handled by ddraw.h - */ -#ifndef IID_IDirectDraw2 -DEFINE_GUID( IID_IDirectDraw2,0xB3A6F3E0,0x2B43,0x11CF,0xA2,0xDE,0x00,0xAA,0x00,0xB9,0x33,0x56 ); -#endif /* IID_IDirectDraw2 */ /* @@ -147,9 +130,7 @@ winCreatePrimarySurfaceShadowDD (ScreenPtr pScreen) return FALSE; } -#if CYGDEBUG winDebug ("winCreatePrimarySurfaceShadowDD - Created primary surface\n"); -#endif /* * Attach a clipper to the primary surface that will clip our blits to our @@ -165,10 +146,8 @@ winCreatePrimarySurfaceShadowDD (ScreenPtr pScreen) return FALSE; } -#if CYGDEBUG winDebug ("winCreatePrimarySurfaceShadowDD - Attached clipper to " "primary surface\n"); -#endif /* Everything was correct */ return TRUE; @@ -185,7 +164,7 @@ winReleasePrimarySurfaceShadowDD (ScreenPtr pScreen) { winScreenPriv(pScreen); - ErrorF ("winReleasePrimarySurfaceShadowDD - Hello\n"); + winDebug ("winReleasePrimarySurfaceShadowDD - Hello\n"); /* Release the primary surface and clipper, if they exist */ if (pScreenPriv->pddsPrimary) @@ -197,14 +176,14 @@ winReleasePrimarySurfaceShadowDD (ScreenPtr pScreen) IDirectDrawSurface2_SetClipper (pScreenPriv->pddsPrimary, NULL); - ErrorF ("winReleasePrimarySurfaceShadowDD - Detached clipper\n"); + winDebug ("winReleasePrimarySurfaceShadowDD - Detached clipper\n"); /* Release the primary surface */ IDirectDrawSurface2_Release (pScreenPriv->pddsPrimary); pScreenPriv->pddsPrimary = NULL; } - ErrorF ("winReleasePrimarySurfaceShadowDD - Released primary surface\n"); + winDebug ("winReleasePrimarySurfaceShadowDD - Released primary surface\n"); return TRUE; } @@ -227,9 +206,7 @@ winAllocateFBShadowDD (ScreenPtr pScreen) DDSURFACEDESC ddsd; DDSURFACEDESC *pddsdShadow = NULL; -#if CYGDEBUG winDebug ("winAllocateFBShadowDD\n"); -#endif /* Create a clipper */ ddrval = (*g_fpDirectDrawCreateClipper) (0, @@ -242,9 +219,7 @@ winAllocateFBShadowDD (ScreenPtr pScreen) return FALSE; } -#if CYGDEBUG winDebug ("winAllocateFBShadowDD - Created a clipper\n"); -#endif /* Get a device context for the screen */ pScreenPriv->hdcScreen = GetDC (pScreenPriv->hwndScreen); @@ -261,9 +236,7 @@ winAllocateFBShadowDD (ScreenPtr pScreen) return FALSE; } -#if CYGDEBUG winDebug ("winAllocateFBShadowDD - Attached clipper to window\n"); -#endif /* Create a DirectDraw object, store the address at lpdd */ ddrval = (*g_fpDirectDrawCreate) (NULL, &pScreenPriv->pdd, NULL); @@ -274,9 +247,7 @@ winAllocateFBShadowDD (ScreenPtr pScreen) return FALSE; } -#if CYGDEBUG winDebug ("winAllocateFBShadowDD () - Created and initialized DD\n"); -#endif /* Get a DirectDraw2 interface pointer */ ddrval = IDirectDraw_QueryInterface (pScreenPriv->pdd, @@ -359,7 +330,7 @@ winAllocateFBShadowDD (ScreenPtr pScreen) || pScreenInfo->dwBPP != GetDeviceCaps (hdc, BITSPIXEL) || pScreenInfo->dwRefreshRate != 0)) { - ErrorF ("winAllocateFBShadowDD - Changing video mode\n"); + winDebug ("winAllocateFBShadowDD - Changing video mode\n"); /* Change the video mode to the mode requested, and use the driver default refresh rate on failure */ ddrval = IDirectDraw2_SetDisplayMode (pScreenPriv->pdd2, @@ -391,7 +362,7 @@ winAllocateFBShadowDD (ScreenPtr pScreen) } else { - ErrorF ("winAllocateFBShadowDD - Not changing video mode\n"); + winDebug ("winAllocateFBShadowDD - Not changing video mode\n"); } /* Release our DC */ @@ -448,9 +419,7 @@ winAllocateFBShadowDD (ScreenPtr pScreen) return FALSE; } -#if CYGDEBUG winDebug ("winAllocateFBShadowDD - Created shadow\n"); -#endif /* Allocate a DD surface description for our screen privates */ pddsdShadow = pScreenPriv->pddsdShadow = malloc (sizeof (DDSURFACEDESC)); @@ -463,9 +432,7 @@ winAllocateFBShadowDD (ScreenPtr pScreen) ZeroMemory (pddsdShadow, sizeof (*pddsdShadow)); pddsdShadow->dwSize = sizeof (*pddsdShadow); -#if CYGDEBUG winDebug ("winAllocateFBShadowDD - Locking shadow\n"); -#endif /* Lock the shadow surface */ ddrval = IDirectDrawSurface2_Lock (pScreenPriv->pddsShadow, @@ -480,9 +447,7 @@ winAllocateFBShadowDD (ScreenPtr pScreen) return FALSE; } -#if CYGDEBUG winDebug ("winAllocateFBShadowDD - Locked shadow\n"); -#endif /* We don't know how to deal with anything other than RGB */ if (!(pddsdShadow->ddpfPixelFormat.dwFlags & DDPF_RGB)) @@ -503,9 +468,7 @@ winAllocateFBShadowDD (ScreenPtr pScreen) pScreenPriv->dwGreenMask = pddsdShadow->ddpfPixelFormat.u3.dwGBitMask; pScreenPriv->dwBlueMask = pddsdShadow->ddpfPixelFormat.u4.dwBBitMask; -#if CYGDEBUG winDebug ("winAllocateFBShadowDD - Returning\n"); -#endif return TRUE; } @@ -646,6 +609,7 @@ winShadowUpdateDD (ScreenPtr pScreen, /* Has our memory pointer changed? */ if (pScreenInfo->pfb != pScreenPriv->pddsdShadow->lpSurface) { + extern const char *g_pszLogFile; ErrorF ("winShadowUpdateDD - Memory location of the shadow " "surface has changed, trying to update the root window " "pixmap header to point to the new address. If you get " @@ -687,9 +651,7 @@ winCloseScreenShadowDD (int nIndex, ScreenPtr pScreen) winScreenInfo *pScreenInfo = pScreenPriv->pScreenInfo; Bool fReturn; -#if CYGDEBUG winDebug ("winCloseScreenShadowDD - Freeing screen resources\n"); -#endif /* Flag that the screen is closed */ pScreenPriv->fClosed = TRUE; @@ -813,7 +775,7 @@ winInitVisualsShadowDD (ScreenPtr pScreen) else pScreenPriv->dwBitsPerRGB = dwBlueBits; - ErrorF ("winInitVisualsShadowDD - Masks %08x %08x %08x BPRGB %d d %d " + winDebug ("winInitVisualsShadowDD - Masks %08x %08x %08x BPRGB %d d %d " "bpp %d\n", (unsigned int) pScreenPriv->dwRedMask, (unsigned int) pScreenPriv->dwGreenMask, @@ -932,9 +894,7 @@ winInitVisualsShadowDD (ScreenPtr pScreen) return FALSE; } -#if CYGDEBUG winDebug ("winInitVisualsShadowDD - Returning\n"); -#endif return TRUE; } @@ -967,7 +927,7 @@ winAdjustVideoModeShadowDD (ScreenPtr pScreen) if (pScreenInfo->dwBPP == WIN_DEFAULT_BPP) { /* No -depth parameter passed, let the user know the depth being used */ - ErrorF ("winAdjustVideoModeShadowDD - Using Windows display " + winDebug ("winAdjustVideoModeShadowDD - Using Windows display " "depth of %d bits per pixel\n", (int) dwBPP); /* Use GDI's depth */ @@ -977,13 +937,13 @@ winAdjustVideoModeShadowDD (ScreenPtr pScreen) && pScreenInfo->dwBPP != dwBPP) { /* FullScreen, and GDI depth differs from -depth parameter */ - ErrorF ("winAdjustVideoModeShadowDD - FullScreen, using command line " + winDebug ("winAdjustVideoModeShadowDD - FullScreen, using command line " "bpp: %d\n", (int) pScreenInfo->dwBPP); } else if (dwBPP != pScreenInfo->dwBPP) { /* Windowed, and GDI depth differs from -depth parameter */ - ErrorF ("winAdjustVideoModeShadowDD - Windowed, command line bpp: " + winDebug ("winAdjustVideoModeShadowDD - Windowed, command line bpp: " "%d, using bpp: %d\n", (int) pScreenInfo->dwBPP, (int) dwBPP); /* We'll use GDI's depth */ @@ -1379,10 +1339,8 @@ winDestroyColormapShadowDD (ColormapPtr pColormap) */ if (pColormap->flags & IsDefault) { -#if CYGDEBUG winDebug ("winDestroyColormapShadowDD - Destroying default " "colormap\n"); -#endif /* * FIXME: Walk the list of all screens, popping the default |