Test for SetDefault and SetNull before using them (not present in FreeRDP 1.0.1), fix naming conflict with default pointer setting functions.
This commit is contained in:
parent
e710287196
commit
36def67dfd
@ -55,6 +55,11 @@ AC_CHECK_LIB([freerdp-codec], [freerdp_image_convert],, AC_MSG_ERROR("libfreerdp
|
||||
# Checks for header files.
|
||||
AC_CHECK_HEADERS([guacamole/client.h guacamole/guacio.h guacamole/protocol.h freerdp/locale/keyboard.h freerdp/kbd/layouts.h])
|
||||
|
||||
# Check for FreeRDP version-specific features
|
||||
AC_CHECK_MEMBERS([rdpPointer.SetDefault, rdpPointer.SetNull],
|
||||
[], [],
|
||||
[[#include <freerdp/freerdp.h>]])
|
||||
|
||||
# Checks for library functions.
|
||||
AC_FUNC_MALLOC
|
||||
|
||||
|
@ -71,6 +71,6 @@ extern unsigned char guac_rdp_default_pointer[];
|
||||
*
|
||||
* @param client The guac_client to send the cursor to.
|
||||
*/
|
||||
void guac_rdp_pointer_set_default(guac_client* client);
|
||||
void guac_rdp_set_default_pointer(guac_client* client);
|
||||
|
||||
#endif
|
||||
|
@ -152,8 +152,12 @@ boolean rdp_freerdp_pre_connect(freerdp* instance) {
|
||||
pointer->New = guac_rdp_pointer_new;
|
||||
pointer->Free = guac_rdp_pointer_free;
|
||||
pointer->Set = guac_rdp_pointer_set;
|
||||
#ifdef HAVE_RDPPOINTER_SETNULL
|
||||
pointer->SetNull = guac_rdp_pointer_set_null;
|
||||
#endif
|
||||
#ifdef HAVE_RDPPOINTER_SETDEFAULT
|
||||
pointer->SetDefault = guac_rdp_pointer_set_default;
|
||||
#endif
|
||||
graphics_register_pointer(context->graphics, pointer);
|
||||
xfree(pointer);
|
||||
|
||||
@ -433,7 +437,7 @@ int guac_client_init(guac_client* client, int argc, char** argv) {
|
||||
CAIRO_FORMAT_ARGB32, settings->width, settings->height);
|
||||
|
||||
/* Set default pointer */
|
||||
guac_rdp_pointer_set_default(client);
|
||||
guac_rdp_set_default_pointer(client);
|
||||
|
||||
/* Success */
|
||||
return 0;
|
||||
|
@ -76,7 +76,7 @@ unsigned char guac_rdp_default_pointer[] = {
|
||||
};
|
||||
|
||||
|
||||
void guac_rdp_pointer_set_default(guac_client* client) {
|
||||
void guac_rdp_set_default_pointer(guac_client* client) {
|
||||
|
||||
guac_socket* socket = client->socket;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user