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.c47
1 files changed, 17 insertions, 30 deletions
diff --git a/xorg-server/hw/xwin/winscrinit.c b/xorg-server/hw/xwin/winscrinit.c
index 983ff5730..3cf74cdcc 100644
--- a/xorg-server/hw/xwin/winscrinit.c
+++ b/xorg-server/hw/xwin/winscrinit.c
@@ -93,10 +93,8 @@ winScreenInit (int index,
HDC hdc;
DWORD dwInitialBPP;
-#if CYGDEBUG || YES
winDebug ("winScreenInit - dwWidth: %ld dwHeight: %ld\n",
pScreenInfo->dwWidth, pScreenInfo->dwHeight);
-#endif
/* Allocate privates for this screen */
if (!winAllocatePrivates (pScreen))
@@ -129,8 +127,8 @@ winScreenInit (int index,
/* Horribly misnamed function: Allow engine to adjust BPP for screen */
dwInitialBPP = pScreenInfo->dwBPP;
-
- if (!(*pScreenPriv->pwinAdjustVideoMode) (pScreen))
+
+ if (pScreenPriv->pwinAdjustVideoMode && !(*pScreenPriv->pwinAdjustVideoMode) (pScreen))
{
ErrorF ("winScreenInit - winAdjustVideoMode () failed\n");
return FALSE;
@@ -139,16 +137,16 @@ winScreenInit (int index,
if (dwInitialBPP == WIN_DEFAULT_BPP)
{
/* No -depth parameter was passed, let the user know the depth being used */
- ErrorF ("winScreenInit - Using Windows display depth of %d bits per pixel\n", (int) pScreenInfo->dwBPP);
+ winDebug ("winScreenInit - Using Windows display depth of %d bits per pixel\n", (int) pScreenInfo->dwBPP);
}
else if (dwInitialBPP != pScreenInfo->dwBPP)
{
/* Warn user if engine forced a depth different to -depth parameter */
- ErrorF ("winScreenInit - Command line depth of %d bpp overidden by engine, using %d bpp\n", (int) dwInitialBPP, (int) pScreenInfo->dwBPP);
+ winDebug ("winScreenInit - Command line depth of %d bpp overidden by engine, using %d bpp\n", (int) dwInitialBPP, (int) pScreenInfo->dwBPP);
}
else
{
- ErrorF ("winScreenInit - Using command line depth of %d bpp\n", (int) pScreenInfo->dwBPP);
+ winDebug ("winScreenInit - Using command line depth of %d bpp\n", (int) pScreenInfo->dwBPP);
}
/* Check for supported display depth */
@@ -186,7 +184,7 @@ winScreenInit (int index,
}
/* Create display window */
- if (!(*pScreenPriv->pwinCreateBoundingWindow) (pScreen))
+ if (pScreenPriv->pwinCreateBoundingWindow && !(*pScreenPriv->pwinCreateBoundingWindow) (pScreen))
{
ErrorF ("winScreenInit - pwinCreateBoundingWindow () "
"failed\n");
@@ -217,7 +215,7 @@ winScreenInit (int index,
miClearVisualTypes ();
/* 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");
@@ -229,8 +227,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
@@ -239,12 +239,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;
}
@@ -301,7 +298,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);
@@ -401,16 +398,12 @@ winFinishScreenInitFB (int index,
#endif
/* 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");
@@ -426,9 +419,7 @@ winFinishScreenInitFB (int index,
#endif
)
{
-#if CYGDEBUG
winDebug ("winFinishScreenInitFB - Calling shadowSetup ()\n");
-#endif
if (!shadowSetup(pScreen))
{
ErrorF ("winFinishScreenInitFB - shadowSetup () failed\n");
@@ -576,14 +567,12 @@ winFinishScreenInitFB (int index,
#ifdef XWIN_MULTIWINDOW
|| pScreenInfo->fMultiWindow
#endif
-#ifdef XWIN_MULTIWINDOWEXTWM
+#ifdef XWIN_MULTIWINDOWINTWM
|| pScreenInfo->fInternalWM
#endif
)
{
-#if CYGDEBUG || YES
winDebug ("winFinishScreenInitFB - Calling winInitWM.\n");
-#endif
/* Initialize multi window mode */
if (!winInitWM (&pScreenPriv->pWMInfo,
@@ -592,7 +581,7 @@ winFinishScreenInitFB (int index,
&pScreenPriv->pmServerStarted,
pScreenInfo->dwScreen,
(HWND)&pScreenPriv->hwndScreen,
-#ifdef XWIN_MULTIWINDOWEXTWM
+#ifdef XWIN_MULTIWINDOWINTWM
pScreenInfo->fInternalWM ||
#endif
FALSE))
@@ -609,9 +598,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;
}
@@ -727,7 +714,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;
@@ -747,7 +734,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 */
@@ -756,7 +743,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);