Skip to content

Commit

Permalink
multimon fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
jsorg71 committed May 14, 2024
1 parent 73c063e commit db78971
Showing 1 changed file with 12 additions and 7 deletions.
19 changes: 12 additions & 7 deletions xrdp/xrdp_encoder.c
Original file line number Diff line number Diff line change
Expand Up @@ -810,11 +810,13 @@ gfx_wiretosurface1(struct xrdp_encoder *self,
in_uint16_le(in_s, height);
twidth = width;
theight = height;
dst_rect.x1 = left;
dst_rect.y1 = top;
dst_rect.x2 = left + width;
dst_rect.y2 = top + height;

dst_rect.x1 = 0;
dst_rect.y1 = 0;
dst_rect.x2 = width;
dst_rect.y2 = height;
LOG_DEVEL(LOG_LEVEL_INFO, "gfx_wiretosurface1: left %d top "
"%d width %d height %d mon_index %d",
left, top, width, height, mon_index);
/* RFX_AVC420_METABLOCK */
if (out_RFX_AVC420_METABLOCK(&dst_rect, s, d_rects, num_rects_d) != 0)
{
Expand Down Expand Up @@ -857,8 +859,8 @@ gfx_wiretosurface1(struct xrdp_encoder *self,
}
error = xrdp_encoder_x264_encode(
self->codec_handle_h264_gfx[mon_index], 0,
left, top,
width, height, twidth, theight, 0,
0, 0,
width, height, twidth, theight, 0,
enc_gfx_cmd->data,
crects, num_rects_c,
s->p, &bitmap_data_length, NULL);
Expand Down Expand Up @@ -994,6 +996,9 @@ gfx_wiretosurface2(struct xrdp_encoder *self,
in_uint16_le(in_s, top);
in_uint16_le(in_s, width);
in_uint16_le(in_s, height);
LOG_DEVEL(LOG_LEVEL_INFO, "gfx_wiretosurface2: left %d top "
"%d width %d height %d mon_index %d",
left, top, width, height, mon_index);
if (self->codec_handle_prfx_gfx[mon_index] == NULL)
{
self->codec_handle_prfx_gfx[mon_index] = rfxcodec_encode_create(
Expand Down

0 comments on commit db78971

Please sign in to comment.