if (pointer_new->xorBpp > 24)
{
- printf("xorBpp:%d\n", pointer_new->xorBpp);
+ freerdp_image_swap_color_order((uint8*) ci.pixels, ci.width, ci.height);
}
cursor = XcursorImageLoadCursor(xfi->display, &ci);
FREERDP_API uint8* freerdp_icon_convert(uint8* srcData, uint8* dstData, uint8* mask, int width, int height, int bpp, HCLRCONV clrconv);
FREERDP_API uint8* freerdp_mono_image_convert(uint8* srcData, int width, int height, int srcBpp, int dstBpp, uint32 bgcolor, uint32 fgcolor, HCLRCONV clrconv);
FREERDP_API void freerdp_alpha_cursor_convert(uint8* alphaData, uint8* xorMask, uint8* andMask, int width, int height, int bpp, HCLRCONV clrconv);
+FREERDP_API void freerdp_image_swap_color_order(uint8* data, int width, int height);
#ifdef __cplusplus
}
{
/* use pattern (not solid black) for xor area */
xpixel = (i & 1) == (j & 1);
- xpixel = xpixel ? 0xffffff : 0;
- xpixel |= 0xff000000;
+ xpixel = xpixel ? 0xFFFFFF : 0;
+ xpixel |= 0xFF000000;
}
- else if (xpixel == 0xff000000)
+ else if (xpixel == 0xFF000000)
{
xpixel = 0;
}
}
}
+void freerdp_image_swap_color_order(uint8* data, int width, int height)
+{
+ int x, y;
+ uint32* pixel;
+ uint8 a, r, g, b;
+
+ pixel = (uint32*) data;
+
+ for (y = 0; y < height; y++)
+ {
+ for (x = 0; x < width; x++)
+ {
+ GetARGB32(a, r, g, b, *pixel);
+ *pixel = ABGR32(a, r, g, b);
+ pixel++;
+ }
+ }
+}
stream_write_uint16(s, colorPointerFlag); /* colorPointerFlag (2 bytes) */
stream_write_uint16(s, settings->pointer_cache_size); /* colorPointerCacheSize (2 bytes) */
- stream_write_uint16(s, settings->pointer_cache_size); /* pointerCacheSize (2 bytes) */
+
+ if (settings->large_pointer)
+ {
+ stream_write_uint16(s, settings->pointer_cache_size); /* pointerCacheSize (2 bytes) */
+ }
rdp_capability_set_finish(s, header, CAPSET_TYPE_POINTER);
}
rdp_write_offscreen_bitmap_cache_capability_set(s, settings);
}
+ if (settings->large_pointer)
+ {
+ numberCapabilities++;
+ rdp_write_large_pointer_capability_set(s, settings);
+ }
+
if (settings->remote_app)
{
numberCapabilities += 2;