From: Adam Tkac Date: Fri, 27 Aug 2010 09:03:04 +0000 (+0000) Subject: [Bugfix] Set pvfb->pixelFormatDefined only if format is defined. X-Git-Tag: v1.0.90~188 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=7b404a8263353c8480043b412b71794feb280ede;p=tigervnc.git [Bugfix] Set pvfb->pixelFormatDefined only if format is defined. git-svn-id: svn://svn.code.sf.net/p/tigervnc/code/trunk@4126 3789f03b-4d11-0410-bbf8-ca57d06f2519 --- diff --git a/unix/xserver/hw/vnc/xvnc.cc b/unix/xserver/hw/vnc/xvnc.cc index d5bffbeb..5ce61630 100644 --- a/unix/xserver/hw/vnc/xvnc.cc +++ b/unix/xserver/hw/vnc/xvnc.cc @@ -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;