diff options
author | jsorg71 <jsorg71> | 2006-03-07 03:58:41 +0000 |
---|---|---|
committer | jsorg71 <jsorg71> | 2006-03-07 03:58:41 +0000 |
commit | b5efd2034e075a30cc91abed9319a98d0edbb282 (patch) | |
tree | 58b35348e396892bdb25b8b7238b5f77b3813ac8 /xrdp/xrdp_painter.c | |
parent | 05178d073366e08d692bd18e351cb629813482bf (diff) | |
download | xrdp-proprietary-b5efd2034e075a30cc91abed9319a98d0edbb282.tar.gz xrdp-proprietary-b5efd2034e075a30cc91abed9319a98d0edbb282.zip |
patblt opcode fix
Diffstat (limited to 'xrdp/xrdp_painter.c')
-rw-r--r-- | xrdp/xrdp_painter.c | 23 |
1 files changed, 22 insertions, 1 deletions
diff --git a/xrdp/xrdp_painter.c b/xrdp/xrdp_painter.c index 3dad1790..666f5736 100644 --- a/xrdp/xrdp_painter.c +++ b/xrdp/xrdp_painter.c @@ -236,6 +236,7 @@ xrdp_painter_fill_rect(struct xrdp_painter* self, int k; int dx; int dy; + int rop; if (self == 0) { @@ -286,12 +287,32 @@ xrdp_painter_fill_rect(struct xrdp_painter* self, else { k = 0; + rop = self->rop; + /* if opcode is in the form 0x00, 0x11, 0x22, ... convert it */ + if (((rop & 0xf0) >> 4) == (rop & 0xf)) + { + switch (rop) + { + case 0x66: /* xor */ + rop = 0x5a; + break; + case 0xaa: /* noop */ + rop = 0xfb; + break; + case 0xcc: /* copy */ + rop = 0xf0; + break; + case 0x88: /* and */ + rop = 0xc0; + break; + } + } while (xrdp_region_get_rect(region, k, &rect) == 0) { if (rect_intersect(&rect, &clip_rect, &draw_rect)) { libxrdp_orders_pat_blt(self->session, x, y, cx, cy, - self->rop, self->bg_color, self->fg_color, + rop, self->bg_color, self->fg_color, &self->brush, &draw_rect); } k++; |