Call MallocFrameBuffer before SetFormatAndEncodings

The hook is still called after InitialiseRFBConnection() so we can choose
the color settings depending on the vnc server (or settings) in that hook.

This way one can use the "VNC server default format" pixelformat if the
client supports it, or perform a workaround (Intel AMT KVM "classic vnc"
server only works using 8bit colors in RFB3.8)

Signed-off-by: Wouter Van Meir <wouter.vanmeir@pandora.be>
Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
pull/1/head
Wouter Van Meir 13 years ago committed by Johannes Schindelin
parent 09f7c684a2
commit f76c81941a

@ -221,13 +221,13 @@ static rfbBool rfbInitConnection(rfbClient* client)
if (!InitialiseRFBConnection(client))
return FALSE;
if (!SetFormatAndEncodings(client))
return FALSE;
client->width=client->si.framebufferWidth;
client->height=client->si.framebufferHeight;
client->MallocFrameBuffer(client);
if (!SetFormatAndEncodings(client))
return FALSE;
if (client->updateRect.x < 0) {
client->updateRect.x = client->updateRect.y = 0;
client->updateRect.w = client->width;

Loading…
Cancel
Save