]> source.dussan.org Git - tigervnc.git/commitdiff
[Bugfix] Set pvfb->pixelFormatDefined only if format is defined.
authorAdam Tkac <atkac@redhat.com>
Fri, 27 Aug 2010 09:03:04 +0000 (09:03 +0000)
committerAdam Tkac <atkac@redhat.com>
Fri, 27 Aug 2010 09:03:04 +0000 (09:03 +0000)
git-svn-id: svn://svn.code.sf.net/p/tigervnc/code/trunk@4126 3789f03b-4d11-0410-bbf8-ca57d06f2519

unix/xserver/hw/vnc/xvnc.cc

index d5bffbeb490bc0fdb513dcd2eb7f4cbbf1c6f287..5ce61630a4a113f8156d5f7bde1a8f1ee2c52c85 100644 (file)
@@ -1204,15 +1204,15 @@ vfbScreenInit(int index, ScreenPtr pScreen, int argc, char **argv)
     pScreen->whitePixel = pvfb->whitePixel;
 
     if (!pvfb->pixelFormatDefined) {
-       pvfb->pixelFormatDefined = TRUE;
-
        switch (pvfb->fb.depth) {
        case 16:
+           pvfb->pixelFormatDefined = TRUE;
            pvfb->rgbNotBgr = TRUE;
            pvfb->blueBits = pvfb->redBits = 5;
            pvfb->greenBits = 6;
            break;
        case 32:
+           pvfb->pixelFormatDefined = TRUE;
            pvfb->rgbNotBgr = TRUE;
            pvfb->blueBits = pvfb->redBits = pvfb->greenBits = 8;
            break;