Skip to content

Commit

Permalink
fix for non GFX multimon
Browse files Browse the repository at this point in the history
  • Loading branch information
jsorg71 committed Feb 1, 2024
1 parent f59a03d commit 1852b9d
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 16 deletions.
2 changes: 1 addition & 1 deletion module/rdpCapture.c
Original file line number Diff line number Diff line change
Expand Up @@ -873,7 +873,7 @@ rdpCapture2(rdpClientCon *clientCon, RegionPtr in_reg, BoxPtr *out_rects,
src = id->pixels;
dst = id->shmem_pixels;
src_stride = id->lineBytes;
dst_stride = id->shmem_lineBytes;
dst_stride = ((id->width + 63) & ~63) * 4;

src = src + src_stride * id->top + id->left * 4;

Expand Down
31 changes: 17 additions & 14 deletions module/rdpClientCon.c
Original file line number Diff line number Diff line change
Expand Up @@ -2695,7 +2695,7 @@ rdpClientConSendPaintRectShmFd(rdpPtr dev, rdpClientCon *clientCon,
{
/* non gfx */
size = 2 + 2 + 2 + num_rects_d * 8 + 2 + num_rects_c * 8;
size += 4 + 4 + 4 + 4 + 2 + 2 + 2 + 2 + 2 + 2;
size += 4 + 4 + 4 + 4 + 2 + 2 + 2 + 2;
rdpClientConPreCheck(dev, clientCon, size);

s = clientCon->out_s;
Expand All @@ -2711,12 +2711,20 @@ rdpClientConSendPaintRectShmFd(rdpPtr dev, rdpClientCon *clientCon,
out_uint32_le(s, clientCon->rect_id);
out_uint32_le(s, id->shmem_bytes);
out_uint32_le(s, id->shmem_offset);
out_uint16_le(s, id->left);
out_uint16_le(s, id->top);
out_uint16_le(s, id->width);
out_uint16_le(s, id->height);
out_uint16_le(s, clientCon->cap_width);
out_uint16_le(s, clientCon->cap_height);
if (capture_code == 2) /* rfx */
{
out_uint16_le(s, id->left);
out_uint16_le(s, id->top);
out_uint16_le(s, id->width);
out_uint16_le(s, id->height);
}
else
{
out_uint16_le(s, 0);
out_uint16_le(s, 0);
out_uint16_le(s, clientCon->cap_width);
out_uint16_le(s, clientCon->cap_height);
}
rdpClientConSendPending(clientCon->dev, clientCon);
g_sck_send_fd_set(clientCon->sck, "int", 4, &(id->shmem_fd), 1);
}
Expand All @@ -2726,7 +2734,7 @@ rdpClientConSendPaintRectShmFd(rdpPtr dev, rdpClientCon *clientCon,
wiretosurface2_bytes = 8 + 13 +
2 + num_rects_d * 8 +
2 + num_rects_c * 8 +
12;
8;
end_frame_bytes = 8 + 4;

size = 2 + 2; /* header */
Expand Down Expand Up @@ -2774,8 +2782,6 @@ rdpClientConSendPaintRectShmFd(rdpPtr dev, rdpClientCon *clientCon,
out_uint16_le(s, id->top);
out_uint16_le(s, id->width);
out_uint16_le(s, id->height);
out_uint16_le(s, clientCon->cap_width);
out_uint16_le(s, clientCon->cap_height);

/* XR_RDPGFX_CMDID_ENDFRAME */
out_uint16_le(s, 0x000C);
Expand All @@ -2800,7 +2806,7 @@ rdpClientConSendPaintRectShmFd(rdpPtr dev, rdpClientCon *clientCon,
wiretosurface1_bytes = 8 + 9 +
2 + num_rects_d * 8 +
2 + num_rects_c * 8 +
12;
8;
end_frame_bytes = 8 + 4;

size = 2 + 2; /* header */
Expand Down Expand Up @@ -2847,8 +2853,6 @@ rdpClientConSendPaintRectShmFd(rdpPtr dev, rdpClientCon *clientCon,
out_uint16_le(s, id->top);
out_uint16_le(s, id->width);
out_uint16_le(s, id->height);
out_uint16_le(s, clientCon->cap_width);
out_uint16_le(s, clientCon->cap_height);

/* XR_RDPGFX_CMDID_ENDFRAME */
out_uint16_le(s, 0x000C);
Expand Down Expand Up @@ -3080,7 +3084,6 @@ rdpScheduleDeferredUpdate(rdpClientCon *clientCon)
{
return;
}

curTime = (uint32_t) GetTimeInMillis();
/* use two separate delays in order to limit the update rate and wait a bit
for more changes before sending an update. Always waiting the longer
Expand Down
2 changes: 1 addition & 1 deletion module/rdpEgl.c
Original file line number Diff line number Diff line change
Expand Up @@ -565,7 +565,7 @@ rdpEglOut(rdpClientCon *clientCon, struct rdp_egl *egl, RegionPtr in_reg,
LLOGLN(0, ("rdpEglOut: glCheckFramebufferStatus error"));
}
dst = id->shmem_pixels;
dst_stride = id->shmem_lineBytes;
dst_stride = ((id->width + 63) & ~63) * 4;
/* check crc list size */
crc_stride = (id->width + 63) / 64;
num_crcs = crc_stride * ((id->height + 63) / 64);
Expand Down

0 comments on commit 1852b9d

Please sign in to comment.