From 5cb463e74bfb7db0167603c2cdae0cfe2aa9b686 Mon Sep 17 00:00:00 2001 From: akallabeth Date: Mon, 29 Jan 2024 17:35:23 +0100 Subject: [PATCH] [channel,rdpgfx] disable client side caps If no image scaling is available disable capabilities that require image scaling to function properly --- channels/rdpgfx/client/rdpgfx_main.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/channels/rdpgfx/client/rdpgfx_main.c b/channels/rdpgfx/client/rdpgfx_main.c index 831b42b6e..d70db2085 100644 --- a/channels/rdpgfx/client/rdpgfx_main.c +++ b/channels/rdpgfx/client/rdpgfx_main.c @@ -314,6 +314,10 @@ static UINT rdpgfx_send_supported_caps(GENERIC_CHANNEL_CALLBACK* callback) capsSet->flags = caps10Flags; } + /* The following capabilities expect support for image scaling. + * Disable these for builds that do not have support for that. + */ +#if defined(WITH_CAIRO) || defined(WITH_SWSCALE) if (!rdpgfx_is_capability_filtered(gfx, RDPGFX_CAPVERSION_105)) { capsSet = &capsSets[pdu.capsSetCount++]; @@ -337,6 +341,7 @@ static UINT rdpgfx_send_supported_caps(GENERIC_CHANNEL_CALLBACK* callback) capsSet->length = 0x4; capsSet->flags = caps10Flags; } +#endif if (!rdpgfx_is_capability_filtered(gfx, RDPGFX_CAPVERSION_107)) {