Commit d1975049 authored by dscho's avatar dscho

fix silly update bug with raw encoding

parent f868d56e
...@@ -728,26 +728,27 @@ HandleRFBServerMessage(rfbClient* client) ...@@ -728,26 +728,27 @@ HandleRFBServerMessage(rfbClient* client)
switch (rect.encoding) { switch (rect.encoding) {
case rfbEncodingRaw: case rfbEncodingRaw: {
int y=rect.r.y, h=rect.r.h;
bytesPerLine = rect.r.w * client->format.bitsPerPixel / 8; bytesPerLine = rect.r.w * client->format.bitsPerPixel / 8;
linesToRead = BUFFER_SIZE / bytesPerLine; linesToRead = BUFFER_SIZE / bytesPerLine;
while (rect.r.h > 0) { while (h > 0) {
if (linesToRead > rect.r.h) if (linesToRead > h)
linesToRead = rect.r.h; linesToRead = h;
if (!ReadFromRFBServer(client, client->buffer,bytesPerLine * linesToRead)) if (!ReadFromRFBServer(client, client->buffer,bytesPerLine * linesToRead))
return FALSE; return FALSE;
CopyRectangle(client, client->buffer, CopyRectangle(client, client->buffer,
rect.r.x, rect.r.y, rect.r.w,linesToRead); rect.r.x, y, rect.r.w,linesToRead);
rect.r.h -= linesToRead; h -= linesToRead;
rect.r.y += linesToRead; y += linesToRead;
} }
break; } break;
case rfbEncodingCopyRect: case rfbEncodingCopyRect:
{ {
......
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