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;
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 =
......
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