diff options
author | dscho <dscho> | 2002-04-25 08:08:38 +0000 |
---|---|---|
committer | dscho <dscho> | 2002-04-25 08:08:38 +0000 |
commit | 160c85f4ecd37b9ab046403e0bc1b5f834a9c3d4 (patch) | |
tree | ee3fd29543ccf0e4289d0509a891a848c94605bc /mac.c | |
parent | 48e64b87c94f5c799d1fea16aacf3e7a96832535 (diff) | |
download | libtdevnc-160c85f4ecd37b9ab046403e0bc1b5f834a9c3d4.tar.gz libtdevnc-160c85f4ecd37b9ab046403e0bc1b5f834a9c3d4.zip |
now colour handling should be correct
Diffstat (limited to 'mac.c')
-rw-r--r-- | mac.c | 7 |
1 files changed, 6 insertions, 1 deletions
@@ -281,11 +281,16 @@ Bool viewOnly = FALSE, sharedMode = FALSE; void ScreenInit(int argc, char**argv) { + int bitsPerSample=CGDisplayBitsPerSample(kCGDirectMainDisplay); rfbScreen = rfbGetScreen(&argc,argv, CGDisplayPixelsWide(kCGDirectMainDisplay), CGDisplayPixelsHigh(kCGDirectMainDisplay), - CGDisplayBitsPerSample(kCGDirectMainDisplay), + bitsPerSample, CGDisplaySamplesPerPixel(kCGDirectMainDisplay),4); + rfbScreen->rfbServerFormat->redShift = bitsPerSample*2; + rfbScreen->rfbServerFormat->greenShift = bitsPerSample*1; + rfbScreen->rfbServerFormat->blueShift = 0; + gethostname(rfbScreen->rfbThisHost, 255); rfbScreen->paddedWidthInBytes = CGDisplayBytesPerRow(kCGDirectMainDisplay); rfbScreen->frameBuffer = |