cursor: Fix alpha mask stride
parent
9a292afd52
commit
70784e1bcc
13
src/cursor.c
13
src/cursor.c
|
@ -69,15 +69,14 @@ int cursor_encode(struct vec* dst, struct rfb_pixel_format* pixfmt,
|
||||||
dstdata = dst->data;
|
dstdata = dst->data;
|
||||||
dstdata += dst->len;
|
dstdata += dst->len;
|
||||||
|
|
||||||
if(image->width == image->stride) {
|
for (int y = 0; y < image->height; ++y) {
|
||||||
if (!extract_alpha_mask(dstdata, image->addr,
|
if (!extract_alpha_mask(dstdata + y * UDIV_UP(image->width, 8),
|
||||||
image->fourcc_format, size))
|
(uint32_t*)image->addr + y * image->stride,
|
||||||
|
image->fourcc_format, image->width))
|
||||||
return -1;
|
return -1;
|
||||||
} else {
|
|
||||||
// TODO
|
dst->len += UDIV_UP(image->width, 8);
|
||||||
abort();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
dst->len += UDIV_UP(size, 8);
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue