Commit 7c7e8e76 authored by Christian Beier's avatar Christian Beier

Re-add the useful bits of 9aa9ac59.

parent e543e1ac
...@@ -167,6 +167,10 @@ static void FillRectangle(rfbClient* client, int x, int y, int w, int h, uint32_ ...@@ -167,6 +167,10 @@ static void FillRectangle(rfbClient* client, int x, int y, int w, int h, uint32_
static void CopyRectangle(rfbClient* client, uint8_t* buffer, int x, int y, int w, int h) { static void CopyRectangle(rfbClient* client, uint8_t* buffer, int x, int y, int w, int h) {
int j; int j;
if (client->frameBuffer == NULL) {
return;
}
#define COPY_RECT(BPP) \ #define COPY_RECT(BPP) \
{ \ { \
int rs = w * BPP / 8, rs2 = client->width * BPP / 8; \ int rs = w * BPP / 8, rs2 = client->width * BPP / 8; \
......
...@@ -154,6 +154,9 @@ rfbClient* rfbGetClient(int bitsPerSample,int samplesPerPixel, ...@@ -154,6 +154,9 @@ rfbClient* rfbGetClient(int bitsPerSample,int samplesPerPixel,
/* default: use complete frame buffer */ /* default: use complete frame buffer */
client->updateRect.x = -1; client->updateRect.x = -1;
client->frameBuffer = NULL;
client->outputWindow = 0;
client->format.bitsPerPixel = bytesPerPixel*8; client->format.bitsPerPixel = bytesPerPixel*8;
client->format.depth = bitsPerSample*samplesPerPixel; client->format.depth = bitsPerSample*samplesPerPixel;
client->appData.requestedDepth=client->format.depth; client->appData.requestedDepth=client->format.depth;
......
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