]> source.dussan.org Git - tigervnc.git/commitdiff
Synched InitOutput with modern InitOutput.c.
authorPeter Åstrand <astrand@cendio.se>
Tue, 22 Feb 2005 21:37:32 +0000 (21:37 +0000)
committerPeter Åstrand <astrand@cendio.se>
Tue, 22 Feb 2005 21:37:32 +0000 (21:37 +0000)
git-svn-id: svn://svn.code.sf.net/p/tigervnc/code/trunk@225 3789f03b-4d11-0410-bbf8-ca57d06f2519

xc/programs/Xserver/vnc/Xvnc/xvnc.cc

index e1ed9baff6acd8a1746879a6e4d89f45cbf0c45d..89bca7f92d5c6f3b3d58fbf11295c81149f829a9 100644 (file)
@@ -1031,68 +1031,66 @@ static void vfbClientStateChange(CallbackListPtr*, pointer, pointer) {
   dispatchException &= ~DE_RESET;
 }
 
-void InitOutput(ScreenInfo *screenInfo, int argc, char **argv)
+void
+InitOutput(ScreenInfo *screenInfo, int argc, char **argv)
 {
-  ErrorF("\nXvnc version %s - built %s\n", XVNCVERSION, buildtime);
-  ErrorF("Underlying X server release %d, %s\n\n", VENDOR_RELEASE,
-         VENDOR_STRING);
-  wellKnownSocketsCreated = true;
-
-  int i;
-  int NumFormats = 0;
+    ErrorF("\nXvnc version %s - built %s\n", XVNCVERSION, buildtime);
+    ErrorF("Underlying X server release %d, %s\n\n", VENDOR_RELEASE,
+          VENDOR_STRING);
+    int i;
+    int NumFormats = 0;
 
-  /* initialize pixmap formats */
+    /* initialize pixmap formats */
 
-  /* must have a pixmap depth to match every screen depth */
-  for (i = 0; i < vfbNumScreens; i++)
-  {
-    vfbPixmapDepths[vfbScreens[i].depth] = TRUE;
-  }
+    /* must have a pixmap depth to match every screen depth */
+    for (i = 0; i < vfbNumScreens; i++)
+    {
+       vfbPixmapDepths[vfbScreens[i].depth] = TRUE;
+    }
 
-  /* RENDER needs a good set of pixmaps. */
-  if (Render) {
-      vfbPixmapDepths[1] = TRUE;
-      vfbPixmapDepths[4] = TRUE;
-      vfbPixmapDepths[8] = TRUE;
-/*    vfbPixmapDepths[15] = TRUE; */
-      vfbPixmapDepths[16] = TRUE;
-      vfbPixmapDepths[24] = TRUE;
-      vfbPixmapDepths[32] = TRUE;
-  }
+    /* RENDER needs a good set of pixmaps. */
+    if (Render) {
+       vfbPixmapDepths[1] = TRUE;
+       vfbPixmapDepths[4] = TRUE;
+       vfbPixmapDepths[8] = TRUE;
+/*     vfbPixmapDepths[15] = TRUE; */
+       vfbPixmapDepths[16] = TRUE;
+       vfbPixmapDepths[24] = TRUE;
+       vfbPixmapDepths[32] = TRUE;
+    }
 
-  for (i = 1; i <= 32; i++)
-  {
-    if (vfbPixmapDepths[i])
+    for (i = 1; i <= 32; i++)
     {
-      if (NumFormats >= MAXFORMATS)
-        FatalError ("MAXFORMATS is too small for this server\n");
-      screenInfo->formats[NumFormats].depth = i;
-      screenInfo->formats[NumFormats].bitsPerPixel = vfbBitsPerPixel(i);
-      screenInfo->formats[NumFormats].scanlinePad = BITMAP_SCANLINE_PAD;
-      NumFormats++;
+       if (vfbPixmapDepths[i])
+       {
+           if (NumFormats >= MAXFORMATS)
+               FatalError ("MAXFORMATS is too small for this server\n");
+           screenInfo->formats[NumFormats].depth = i;
+           screenInfo->formats[NumFormats].bitsPerPixel = vfbBitsPerPixel(i);
+           screenInfo->formats[NumFormats].scanlinePad = BITMAP_SCANLINE_PAD;
+           NumFormats++;
+       }
     }
-  }
 
-  screenInfo->imageByteOrder = IMAGE_BYTE_ORDER;
-  screenInfo->bitmapScanlineUnit = BITMAP_SCANLINE_UNIT;
-  screenInfo->bitmapScanlinePad = BITMAP_SCANLINE_PAD;
-  screenInfo->bitmapBitOrder = BITMAP_BIT_ORDER;
-  screenInfo->numPixmapFormats = NumFormats;
+    screenInfo->imageByteOrder = IMAGE_BYTE_ORDER;
+    screenInfo->bitmapScanlineUnit = BITMAP_SCANLINE_UNIT;
+    screenInfo->bitmapScanlinePad = BITMAP_SCANLINE_PAD;
+    screenInfo->bitmapBitOrder = BITMAP_BIT_ORDER;
+    screenInfo->numPixmapFormats = NumFormats;
 
-  /* initialize screens */
+    /* initialize screens */
 
-  for (i = 0; i < vfbNumScreens; i++)
-  {
-    if (-1 == AddScreen(vfbScreenInit, argc, argv))
+    for (i = 0; i < vfbNumScreens; i++)
     {
-      FatalError("Couldn't add screen %d", i);
+       if (-1 == AddScreen(vfbScreenInit, argc, argv))
+       {
+           FatalError("Couldn't add screen %d", i);
+       }
     }
-  }
-
-  if (!AddCallback(&ClientStateCallback, vfbClientStateChange, 0)) {
-    FatalError("AddCallback failed\n");
-  }
 
+    if (!AddCallback(&ClientStateCallback, vfbClientStateChange, 0)) {
+       FatalError("AddCallback failed\n");
+    }
 } /* end InitOutput */
 
 #ifdef DPMSExtension