aboutsummaryrefslogtreecommitdiff
path: root/xorg-server/hw/xwin/winscrinit.c
diff options
context:
space:
mode:
Diffstat (limited to 'xorg-server/hw/xwin/winscrinit.c')
-rw-r--r--xorg-server/hw/xwin/winscrinit.c35
1 files changed, 11 insertions, 24 deletions
diff --git a/xorg-server/hw/xwin/winscrinit.c b/xorg-server/hw/xwin/winscrinit.c
index 179eff8d0..5273460a4 100644
--- a/xorg-server/hw/xwin/winscrinit.c
+++ b/xorg-server/hw/xwin/winscrinit.c
@@ -108,10 +108,8 @@ winScreenInit (int index,
winPrivScreenPtr pScreenPriv;
HDC hdc;
-#if CYGDEBUG || YES
winDebug ("winScreenInit - dwWidth: %ld dwHeight: %ld\n",
pScreenInfo->dwWidth, pScreenInfo->dwHeight);
-#endif
/* Allocate privates for this screen */
if (!winAllocatePrivates (pScreen))
@@ -143,7 +141,7 @@ winScreenInit (int index,
}
/* Adjust the video mode for our engine type */
- if (!(*pScreenPriv->pwinAdjustVideoMode) (pScreen))
+ if (pScreenPriv->pwinAdjustVideoMode && !(*pScreenPriv->pwinAdjustVideoMode) (pScreen))
{
ErrorF ("winScreenInit - winAdjustVideoMode () failed\n");
return FALSE;
@@ -177,7 +175,7 @@ winScreenInit (int index,
}
/* Create display window */
- if (!(*pScreenPriv->pwinCreateBoundingWindow) (pScreen))
+ if (pScreenPriv->pwinCreateBoundingWindow && !(*pScreenPriv->pwinCreateBoundingWindow) (pScreen))
{
ErrorF ("winScreenInit - pwinCreateBoundingWindow () "
"failed\n");
@@ -228,7 +226,7 @@ winScreenInit (int index,
pScreenInfo->dwBPP);
/* Call the engine dependent screen initialization procedure */
- if (!((*pScreenPriv->pwinFinishScreenInit) (index, pScreen, argc, argv)))
+ if (pScreenPriv->pwinFinishScreenInit && !((*pScreenPriv->pwinFinishScreenInit) (index, pScreen, argc, argv)))
{
ErrorF ("winScreenInit - winFinishScreenInit () failed\n");
return FALSE;
@@ -236,8 +234,10 @@ winScreenInit (int index,
if (!g_fSoftwareCursor)
winInitCursor(pScreen);
+#ifdef WINDBG
else
- winErrorFVerb(2, "winScreenInit - Using software cursor\n");
+ winDebug("winScreenInit - Using software cursor\n");
+#endif
/*
Note the screen origin in a normalized coordinate space where (0,0) is at the top left
@@ -246,12 +246,9 @@ winScreenInit (int index,
pScreen->x = pScreenInfo->dwInitialX - GetSystemMetrics(SM_XVIRTUALSCREEN);
pScreen->y = pScreenInfo->dwInitialY - GetSystemMetrics(SM_YVIRTUALSCREEN);
- ErrorF("Screen %d added at virtual desktop coordinate (%d,%d).\n",
+ winDebug("Screen %d added at virtual desktop coordinate (%d,%d).\n",
index, pScreen->x, pScreen->y);
-
-#if CYGDEBUG || YES
winDebug ("winScreenInit - returning\n");
-#endif
return TRUE;
}
@@ -307,7 +304,7 @@ winFinishScreenInitFB (int index,
+ winCountBits (pScreenPriv->dwGreenMask)
+ winCountBits (pScreenPriv->dwBlueMask);
- winErrorFVerb (2, "winFinishScreenInitFB - Masks: %08x %08x %08x\n",
+ winDebug ("winFinishScreenInitFB - Masks: %08x %08x %08x\n",
(unsigned int) pScreenPriv->dwRedMask,
(unsigned int) pScreenPriv->dwGreenMask,
(unsigned int) pScreenPriv->dwBlueMask);
@@ -414,16 +411,12 @@ winFinishScreenInitFB (int index,
/* KDrive does miDCInitialize right after miInitializeBackingStore */
/* Setup the cursor routines */
-#if CYGDEBUG
winDebug ("winFinishScreenInitFB - Calling miDCInitialize ()\n");
-#endif
miDCInitialize (pScreen, &g_winPointerCursorFuncs);
/* KDrive does winCreateDefColormap right after miDCInitialize */
/* Create a default colormap */
-#if CYGDEBUG
winDebug ("winFinishScreenInitFB - Calling winCreateDefColormap ()\n");
-#endif
if (!winCreateDefColormap (pScreen))
{
ErrorF ("winFinishScreenInitFB - Could not create colormap\n");
@@ -439,9 +432,7 @@ winFinishScreenInitFB (int index,
#endif
)
{
-#if CYGDEBUG
winDebug ("winFinishScreenInitFB - Calling shadowSetup ()\n");
-#endif
if (!shadowSetup(pScreen))
{
ErrorF ("winFinishScreenInitFB - shadowSetup () failed\n");
@@ -596,9 +587,7 @@ winFinishScreenInitFB (int index,
#endif
)
{
-#if CYGDEBUG || YES
winDebug ("winFinishScreenInitFB - Calling winInitWM.\n");
-#endif
/* Initialize multi window mode */
if (!winInitWM (&pScreenPriv->pWMInfo,
@@ -624,9 +613,7 @@ winFinishScreenInitFB (int index,
/* Tell the server that we have a valid depth */
pScreenPriv->fBadDepth = FALSE;
-#if CYGDEBUG || YES
winDebug ("winFinishScreenInitFB - returning\n");
-#endif
return TRUE;
}
@@ -742,7 +729,7 @@ winFinishScreenInitNativeGDI (int index,
/* Bitmap */
pScreen->BitmapToRegion = winPixmapToRegionNativeGDI;
- ErrorF ("winFinishScreenInitNativeGDI - calling miDCInitialize\n");
+ winDebug ("winFinishScreenInitNativeGDI - calling miDCInitialize\n");
/* Set the default white and black pixel positions */
pScreen->whitePixel = pScreen->blackPixel = (Pixel) 0;
@@ -762,7 +749,7 @@ winFinishScreenInitNativeGDI (int index,
return FALSE;
}
- ErrorF ("winFinishScreenInitNativeGDI - miCreateDefColormap () "
+ winDebug ("winFinishScreenInitNativeGDI - miCreateDefColormap () "
"returned\n");
/* mi doesn't use a CloseScreen procedure, so no need to wrap */
@@ -771,7 +758,7 @@ winFinishScreenInitNativeGDI (int index,
/* Tell the server that we are enabled */
pScreenPriv->fEnabled = TRUE;
- ErrorF ("winFinishScreenInitNativeGDI - Successful addition of "
+ winDebug ("winFinishScreenInitNativeGDI - Successful addition of "
"screen %08x\n",
(unsigned int) pScreen);