[PATCH weston] compositor-rdp: Fix build with freerdp2
Emilio Pozuelo Monfort
pochu at debian.org
Tue Jan 17 19:58:43 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..94b4bfa9 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;
+#if FREERDP_VERSION_MAJOR == 1 && FREERDP_VERSION_MINOR == 1
rfx_context_set_pixel_format(context->rfx_context, RDP_PIXEL_FORMAT_B8G8R8A8);
+#else
+ rfx_context_set_pixel_format(context->rfx_context, PIXEL_FORMAT_BGRA32);
+#endif
context->nsc_context = nsc_context_new();
if (!context->nsc_context)
goto out_error_nsc;
+#if FREERDP_VERSION_MAJOR == 1 && FREERDP_VERSION_MINOR == 1
nsc_context_set_pixel_format(context->nsc_context, RDP_PIXEL_FORMAT_B8G8R8A8);
+#else
+ nsc_context_set_pixel_format(context->nsc_context, PIXEL_FORMAT_BGRA32);
+#endif
context->encode_stream = Stream_New(NULL, 65536);
if (!context->encode_stream)
--
2.11.0
More information about the wayland-devel
mailing list