[PATCH weston] compositor-rdp: Fix build with freerdp2
Emilio Pozuelo Monfort
pochu at debian.org
Wed Jan 18 17:43:35 UTC 2017
Based on a patch from John Moser <john.r.moser at gmail.com>
https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=850658
Signed-off-by: Emilio Pozuelo Monfort <pochu at debian.org>
---
libweston/compositor-rdp.c | 8 ++++++++
1 file changed, 8 insertions(+)
diff --git a/libweston/compositor-rdp.c b/libweston/compositor-rdp.c
index 223382ce..16f4c628 100644
--- a/libweston/compositor-rdp.c
+++ b/libweston/compositor-rdp.c
@@ -664,13 +664,21 @@ rdp_peer_context_new(freerdp_peer* client, RdpPeerContext* context)
context->rfx_context->mode = RLGR3;
context->rfx_context->width = client->settings->DesktopWidth;
context->rfx_context->height = client->settings->DesktopHeight;
+#ifdef PIXEL_FORMAT_BGRA32
+ rfx_context_set_pixel_format(context->rfx_context, PIXEL_FORMAT_BGRA32);
+#else
rfx_context_set_pixel_format(context->rfx_context, RDP_PIXEL_FORMAT_B8G8R8A8);
+#endif
context->nsc_context = nsc_context_new();
if (!context->nsc_context)
goto out_error_nsc;
+#ifdef PIXEL_FORMAT_BGRA32
+ nsc_context_set_pixel_format(context->nsc_context, PIXEL_FORMAT_BGRA32);
+#else
nsc_context_set_pixel_format(context->nsc_context, RDP_PIXEL_FORMAT_B8G8R8A8);
+#endif
context->encode_stream = Stream_New(NULL, 65536);
if (!context->encode_stream)
--
2.11.0
More information about the wayland-devel
mailing list