summaryrefslogtreecommitdiffstats
path: root/main.c
diff options
context:
space:
mode:
authordscho <dscho>2002-04-24 09:16:28 +0000
committerdscho <dscho>2002-04-24 09:16:28 +0000
commit48e64b87c94f5c799d1fea16aacf3e7a96832535 (patch)
treed79881f0da7b1a95c84e9ad42f2eb7ab9abbbe84 /main.c
parente66eeecd62f62acc3d86f737d979f97a529686b0 (diff)
downloadlibtdevnc-48e64b87c94f5c799d1fea16aacf3e7a96832535.tar.gz
libtdevnc-48e64b87c94f5c799d1fea16aacf3e7a96832535.zip
bug for 3 bpp planes (as Mac OSX)
Diffstat (limited to 'main.c')
-rw-r--r--main.c12
1 files changed, 9 insertions, 3 deletions
diff --git a/main.c b/main.c
index a6458f8..c9f8f85 100644
--- a/main.c
+++ b/main.c
@@ -538,9 +538,15 @@ rfbScreenInfoPtr rfbGetScreen(int* argc,char** argv,
format->greenShift = bitsPerSample;
format->blueShift = bitsPerSample * 2;
} else {
- format->redShift = bitsPerSample*3;
- format->greenShift = bitsPerSample*2;
- format->blueShift = bitsPerSample;
+ if(bytesPerPixel==3) {
+ format->redShift = bitsPerSample*2;
+ format->greenShift = bitsPerSample*1;
+ format->blueShift = 0;
+ } else {
+ format->redShift = bitsPerSample*3;
+ format->greenShift = bitsPerSample*2;
+ format->blueShift = bitsPerSample;
+ }
}
}