Revision: 4592 http://tigervnc.svn.sourceforge.net/tigervnc/?rev=4592&view=rev Author: ossman_ Date: 2011-07-15 08:26:51 +0000 (Fri, 15 Jul 2011)
Log Message: ----------- Make sure we use the correct pixel format for cursors when in non-native mode. Modified Paths: -------------- trunk/vncviewer/Viewport.cxx Modified: trunk/vncviewer/Viewport.cxx =================================================================== --- trunk/vncviewer/Viewport.cxx 2011-07-15 08:26:18 UTC (rev 4591) +++ trunk/vncviewer/Viewport.cxx 2011-07-15 08:26:51 UTC (rev 4592) @@ -223,7 +223,12 @@ U8 *i, *o, *m; int m_width; - const PixelFormat &pf = frameBuffer->getPF(); + const PixelFormat *pf; + + if (pixelTrans) + pf = &pixelTrans->getInPF(); + else + pf = &frameBuffer->getPF(); i = (U8*)data; o = buffer; @@ -231,7 +236,7 @@ m_width = (width+7)/8; for (int y = 0;y < height;y++) { for (int x = 0;x < width;x++) { - pf.rgbFromBuffer(o, i, 1, &colourMap); + pf->rgbFromBuffer(o, i, 1, &colourMap); if (m[(m_width*y)+(x/8)] & 0x80>>(x%8)) o[3] = 255; @@ -239,7 +244,7 @@ o[3] = 0; o += 4; - i += pf.bpp/8; + i += pf->bpp/8; } } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. ------------------------------------------------------------------------------ AppSumo Presents a FREE Video for the SourceForge Community by Eric Ries, the creator of the Lean Startup Methodology on "Lean Startup Secrets Revealed." This video shows you how to validate your ideas, optimize your ideas and identify your business strategy. http://p.sf.net/sfu/appsumosfdev2dev _______________________________________________ Tigervnc-commits mailing list Tigervnc-commits@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/tigervnc-commits