Commit 160c85f4 authored by dscho's avatar dscho

now colour handling should be correct

parent 48e64b87
...@@ -281,11 +281,16 @@ Bool viewOnly = FALSE, sharedMode = FALSE; ...@@ -281,11 +281,16 @@ Bool viewOnly = FALSE, sharedMode = FALSE;
void void
ScreenInit(int argc, char**argv) ScreenInit(int argc, char**argv)
{ {
int bitsPerSample=CGDisplayBitsPerSample(kCGDirectMainDisplay);
rfbScreen = rfbGetScreen(&argc,argv, rfbScreen = rfbGetScreen(&argc,argv,
CGDisplayPixelsWide(kCGDirectMainDisplay), CGDisplayPixelsWide(kCGDirectMainDisplay),
CGDisplayPixelsHigh(kCGDirectMainDisplay), CGDisplayPixelsHigh(kCGDirectMainDisplay),
CGDisplayBitsPerSample(kCGDirectMainDisplay), bitsPerSample,
CGDisplaySamplesPerPixel(kCGDirectMainDisplay),4); CGDisplaySamplesPerPixel(kCGDirectMainDisplay),4);
rfbScreen->rfbServerFormat->redShift = bitsPerSample*2;
rfbScreen->rfbServerFormat->greenShift = bitsPerSample*1;
rfbScreen->rfbServerFormat->blueShift = 0;
gethostname(rfbScreen->rfbThisHost, 255); gethostname(rfbScreen->rfbThisHost, 255);
rfbScreen->paddedWidthInBytes = CGDisplayBytesPerRow(kCGDirectMainDisplay); rfbScreen->paddedWidthInBytes = CGDisplayBytesPerRow(kCGDirectMainDisplay);
rfbScreen->frameBuffer = rfbScreen->frameBuffer =
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment