From 652f5a4b1c72a0c9041ec4140d73e66a975206ae Mon Sep 17 00:00:00 2001 From: dborth Date: Mon, 3 Apr 2017 09:43:44 -0600 Subject: [PATCH] Set trueColour flag to 1 instead of 255 It turns out some server implementations (namely VMware ESXi 6.5) expect 1 as the only non-zero value for the SetPixelFormat message whereas the protocol states every non-zero value is valid (https://github.com/rfbproto/rfbproto/blob/master/rfbproto.rst#setpixelformat). Anyway, setting this to 1 shouldn't hurt. Fixes #141 --- libvncclient/vncviewer.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libvncclient/vncviewer.c b/libvncclient/vncviewer.c index fb25023..780a1cb 100644 --- a/libvncclient/vncviewer.c +++ b/libvncclient/vncviewer.c @@ -280,7 +280,7 @@ rfbClient* rfbGetClient(int bitsPerSample,int samplesPerPixel, client->format.depth = bitsPerSample*samplesPerPixel; client->appData.requestedDepth=client->format.depth; client->format.bigEndian = *(char *)&client->endianTest?FALSE:TRUE; - client->format.trueColour = TRUE; + client->format.trueColour = 1; if (client->format.bitsPerPixel == 8) { client->format.redMax = 7;