GUACAMOLE-249: The FreeRDPConvertColor() function is also known as ConvertColor(), but was only available as ConvertColor() in older FreeRDP 2.0.0 release candidates.

This commit is contained in:
Michael Jumper 2020-01-13 15:42:27 -08:00
parent eaae203e94
commit 9a34caf40f
2 changed files with 20 additions and 1 deletions

View File

@ -541,7 +541,8 @@ AC_ARG_WITH([rdp],
if test "x$with_rdp" != "xno"
then
have_freerdp2=yes
PKG_CHECK_MODULES([RDP], [freerdp2 freerdp-client2 winpr2],,
PKG_CHECK_MODULES([RDP], [freerdp2 freerdp-client2 winpr2],
[CPPFLAGS="${RDP_CFLAGS} $CPPFLAGS"],
[AC_MSG_WARN([
--------------------------------------------
Unable to find FreeRDP (libfreerdp2 / libfreerdp-client2 / libwinpr2)
@ -550,6 +551,19 @@ then
have_freerdp2=no])
fi
# Available color conversion functions
if test "x$have_freerdp2" = "xyes"
then
# FreeRDP 2.0.0-rc3 and older referred to FreeRDPConvertColor() as
# ConvertColor()
AC_CHECK_DECL([FreeRDPConvertColor],
[AC_DEFINE([HAVE_FREERDPCONVERTCOLOR],,
[Whether FreeRDPConvertColor() is defined])],,
[#include <freerdp/codec/color.h>])
fi
AM_CONDITIONAL([ENABLE_RDP], [test "x${have_freerdp2}" = "xyes"])
#

View File

@ -17,6 +17,7 @@
* under the License.
*/
#include "config.h"
#include "settings.h"
#include <freerdp/codec/color.h>
@ -59,8 +60,12 @@ UINT32 guac_rdp_convert_color(rdpContext* context, UINT32 color) {
/* Convert color from RDP source format to the native format used by Cairo,
* still maintaining intermediate representation */
#ifdef HAVE_FREERDPCONVERTCOLOR
intermed = FreeRDPConvertColor(intermed, src_format, dst_format,
&gdi->palette);
#else
intermed = ConvertColor(intermed, src_format, dst_format, &gdi->palette);
#endif
/* Convert color from intermediate representation to the actual desired
* format */