Backport r1022261.

BUG: 162493

svn path=/branches/KDE/4.3/kdenetwork/krfb/; revision=1022262
This commit is contained in:
George Goldberg
2009-09-11 09:48:36 +00:00
parent c3fe689bbd
commit 336d0952eb

View File

@@ -164,9 +164,14 @@ void KrfbServer::startListening()
int w = d->fb->width();
int h = d->fb->height();
int depth = d->fb->depth();
int bpp = depth >> 3;
if (bpp != 1 && bpp != 2 && bpp != 4) bpp = 4;
kDebug() << "bpp: " << bpp;
rfbLogEnable(0);
screen = rfbGetScreen(0, 0, w, h, 8, 3,depth / 8);
screen = rfbGetScreen(0, 0, w, h, 8, 3, bpp);
screen->paddedWidthInBytes = d->fb->paddedWidth();
d->fb->getServerFormat(screen->serverFormat);