rdp: allow to compile against FreeRDP 2.0
FreeRDP 2.0 is about to be released, this allows to compile against this version. The detection is adjusted to prefer FreeRDP 2 against version 1.x. Signed-off-by: David Fort <contact@hardening-consulting.com> Reviewed-by: Quentin Glidic <sardemff7+git@sardemff7.net> Reviewed-by: Bryce Harrington <bryce@osg.samsung.com>
This commit is contained in:
committed by
Bryce Harrington
parent
0887956e4d
commit
58b63ab7f1
+4
-1
@@ -238,7 +238,10 @@ AM_CONDITIONAL([ENABLE_RDP_COMPOSITOR],
|
|||||||
[test x$enable_rdp_compositor = xyes])
|
[test x$enable_rdp_compositor = xyes])
|
||||||
if test x$enable_rdp_compositor = xyes; then
|
if test x$enable_rdp_compositor = xyes; then
|
||||||
AC_DEFINE([BUILD_RDP_COMPOSITOR], [1], [Build the RDP compositor])
|
AC_DEFINE([BUILD_RDP_COMPOSITOR], [1], [Build the RDP compositor])
|
||||||
PKG_CHECK_MODULES(RDP_COMPOSITOR, [freerdp >= 1.1.0])
|
PKG_CHECK_MODULES(RDP_COMPOSITOR, [freerdp2 >= 2.0.0],
|
||||||
|
[],
|
||||||
|
[PKG_CHECK_MODULES(RDP_COMPOSITOR, [freerdp >= 1.1.0],[])]
|
||||||
|
)
|
||||||
|
|
||||||
SAVED_CPPFLAGS="$CPPFLAGS"
|
SAVED_CPPFLAGS="$CPPFLAGS"
|
||||||
CPPFLAGS="$CPPFLAGS $RDP_COMPOSITOR_CFLAGS"
|
CPPFLAGS="$CPPFLAGS $RDP_COMPOSITOR_CFLAGS"
|
||||||
|
|||||||
+16
-7
@@ -42,15 +42,24 @@
|
|||||||
#define FREERDP_VERSION_NUMBER ((FREERDP_VERSION_MAJOR * 0x10000) + \
|
#define FREERDP_VERSION_NUMBER ((FREERDP_VERSION_MAJOR * 0x10000) + \
|
||||||
(FREERDP_VERSION_MINOR * 0x100) + FREERDP_VERSION_REVISION)
|
(FREERDP_VERSION_MINOR * 0x100) + FREERDP_VERSION_REVISION)
|
||||||
|
|
||||||
|
|
||||||
#if FREERDP_VERSION_NUMBER >= 0x10201
|
#if FREERDP_VERSION_NUMBER >= 0x10201
|
||||||
#define HAVE_SKIP_COMPRESSION
|
#define HAVE_SKIP_COMPRESSION
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if FREERDP_VERSION_NUMBER < 0x10202
|
#if FREERDP_VERSION_NUMBER < 0x10202
|
||||||
#define FREERDP_CB_RET_TYPE void
|
# define FREERDP_CB_RET_TYPE void
|
||||||
#define FREERDP_CB_RETURN(V) return
|
# define FREERDP_CB_RETURN(V) return
|
||||||
|
# define NSC_RESET(C, W, H)
|
||||||
|
# define RFX_RESET(C, W, H) do { rfx_context_reset(C); C->width = W; C->height = H; } while(0)
|
||||||
#else
|
#else
|
||||||
#define HAVE_NSC_RESET
|
#if FREERDP_VERSION_MAJOR >= 2
|
||||||
|
# define NSC_RESET(C, W, H) nsc_context_reset(C, W, H)
|
||||||
|
# define RFX_RESET(C, W, H) rfx_context_reset(C, W, H)
|
||||||
|
#else
|
||||||
|
# define NSC_RESET(C, W, H) do { nsc_context_reset(C); C->width = W; C->height = H; } while(0)
|
||||||
|
# define RFX_RESET(C, W, H) do { rfx_context_reset(C); C->width = W; C->height = H; } while(0)
|
||||||
|
#endif
|
||||||
#define FREERDP_CB_RET_TYPE BOOL
|
#define FREERDP_CB_RET_TYPE BOOL
|
||||||
#define FREERDP_CB_RETURN(V) return TRUE
|
#define FREERDP_CB_RETURN(V) return TRUE
|
||||||
#endif
|
#endif
|
||||||
@@ -795,6 +804,7 @@ xf_peer_activate(freerdp_peer* client)
|
|||||||
struct xkb_context *xkbContext;
|
struct xkb_context *xkbContext;
|
||||||
struct xkb_rule_names xkbRuleNames;
|
struct xkb_rule_names xkbRuleNames;
|
||||||
struct xkb_keymap *keymap;
|
struct xkb_keymap *keymap;
|
||||||
|
struct weston_output *weston_output;
|
||||||
int i;
|
int i;
|
||||||
pixman_box32_t box;
|
pixman_box32_t box;
|
||||||
pixman_region32_t damage;
|
pixman_region32_t damage;
|
||||||
@@ -843,10 +853,9 @@ xf_peer_activate(freerdp_peer* client)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
rfx_context_reset(peerCtx->rfx_context);
|
weston_output = &output->base;
|
||||||
#ifdef HAVE_NSC_RESET
|
RFX_RESET(peerCtx->rfx_context, weston_output->width, weston_output->height);
|
||||||
nsc_context_reset(peerCtx->nsc_context);
|
NSC_RESET(peerCtx->nsc_context, weston_output->width, weston_output->height);
|
||||||
#endif
|
|
||||||
|
|
||||||
if (peersItem->flags & RDP_PEER_ACTIVATED)
|
if (peersItem->flags & RDP_PEER_ACTIVATED)
|
||||||
return TRUE;
|
return TRUE;
|
||||||
|
|||||||
Reference in New Issue
Block a user