[PATCH weston] compositor-rdp: Fix build with freerdp2
Emilio Pozuelo Monfort
pochu at debian.org
Wed Jan 18 17:41:53 UTC 2017
On 18/01/17 14:09, Daniel Stone wrote:
> Hi Emilio,
>
> On 17 January 2017 at 19:58, Emilio Pozuelo Monfort <pochu at debian.org> wrote:
>> 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
>
> Unfortunately, as much as this fixes things on Debian, it breaks my
> Fedora 25 build. F25 has a pre-release of 2.0.0 which seems to have a
> halfway-between API: all the non-1.1 paths are valid here, but it
> still has the old pixel-format definitions.
>
> I have FREERDP_VERSION_{MAJOR,MINOR,REVISION,SUFFIX} as 2, 0, 0,
> "dev", respectively. Does Debian have something (maybe a slightly
> larger version, or dropping the 'dev'), which could tell these apart?
Same here and in upstream master.
Debian has commit e60d0d5 from 2016-11-30. Looks like Fedora rawhide has a newer
snapshot, commit 90877f5 from 2016-12-28:
http://pkgs.fedoraproject.org/cgit/rpms/freerdp.git/commit/?id=ddef67974693f50fd8db95fa9e5759b07f91a980
We can check if PIXEL_FORMAT_BGRA32 is defined, and fall back to
RDP_PIXEL_FORMAT_B8G8R8A8 if not. I'll send a patch for that.
Cheers,
Emilio
More information about the wayland-devel
mailing list