Blob Blame History Raw
--- branches/KDE/4.3/kdenetwork/krfb/krfbserver.cpp	2009/06/24 10:17:04	986143
+++ branches/KDE/4.3/kdenetwork/krfb/krfbserver.cpp	2009/09/11 09:48:36	1022262
@@ -164,9 +164,14 @@
     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);