static UINT read_touch_contact_data(RdpeiServerContext* context, wStream* s,
RDPINPUT_CONTACT_DATA* contactData)
{
+ UINT16 tmp;
WINPR_UNUSED(context);
if (Stream_GetRemainingLength(s) < 1)
{
}
Stream_Read_UINT8(s, contactData->contactId);
- if (!rdpei_read_2byte_unsigned(s, &contactData->fieldsPresent) ||
- !rdpei_read_4byte_signed(s, &contactData->x) ||
+ if (!rdpei_read_2byte_unsigned(s, &tmp) || !rdpei_read_4byte_signed(s, &contactData->x) ||
!rdpei_read_4byte_signed(s, &contactData->y) ||
!rdpei_read_4byte_unsigned(s, &contactData->contactFlags))
{
WLog_ERR(TAG, "rdpei_read_ failed!");
return ERROR_INTERNAL_ERROR;
}
+ contactData->fieldsPresent = tmp;
if (contactData->fieldsPresent & CONTACT_DATA_CONTACTRECT_PRESENT)
{
- if (!rdpei_read_2byte_signed(s, &contactData->contactRectLeft) ||
- !rdpei_read_2byte_signed(s, &contactData->contactRectTop) ||
- !rdpei_read_2byte_signed(s, &contactData->contactRectRight) ||
- !rdpei_read_2byte_signed(s, &contactData->contactRectBottom))
+ INT16 tmp[4] = { 0 };
+ if (!rdpei_read_2byte_signed(s, &tmp[0]) || !rdpei_read_2byte_signed(s, &tmp[1]) ||
+ !rdpei_read_2byte_signed(s, &tmp[2]) || !rdpei_read_2byte_signed(s, &tmp[3]))
{
WLog_ERR(TAG, "rdpei_read_ failed!");
return ERROR_INTERNAL_ERROR;
}
+ contactData->contactRectLeft = tmp[0];
+ contactData->contactRectTop = tmp[1];
+ contactData->contactRectRight = tmp[2];
+ contactData->contactRectBottom = tmp[3];
}
if ((contactData->fieldsPresent & CONTACT_DATA_ORIENTATION_PRESENT) &&
static UINT read_touch_frame(RdpeiServerContext* context, wStream* s, RDPINPUT_TOUCH_FRAME* frame)
{
UINT32 i;
+ UINT16 tmp;
RDPINPUT_CONTACT_DATA* contact;
UINT error;
- if (!rdpei_read_2byte_unsigned(s, &frame->contactCount) ||
- !rdpei_read_8byte_unsigned(s, &frame->frameOffset))
+ if (!rdpei_read_2byte_unsigned(s, &tmp) || !rdpei_read_8byte_unsigned(s, &frame->frameOffset))
{
WLog_ERR(TAG, "rdpei_read_ failed!");
return ERROR_INTERNAL_ERROR;
}
+ frame->contactCount = tmp;
frame->contacts = contact = calloc(frame->contactCount, sizeof(RDPINPUT_CONTACT_DATA));
if (!frame->contacts)
};
/* Client Ready Flags */
+#define READY_FLAGS_SHOW_TOUCH_VISUALS 0x00000001 /* Deprecated */
+#define READY_FLAGS_DISABLE_TIMESTAMP_INJECTION 0x00000002 /* Deprecated */
+
#define CS_READY_FLAGS_SHOW_TOUCH_VISUALS 0x00000001
#define CS_READY_FLAGS_DISABLE_TIMESTAMP_INJECTION 0x00000002
#define CS_READY_FLAGS_ENABLE_MULTIPEN_INJECTION 0x00000004
struct _RDPINPUT_CONTACT_DATA
{
UINT32 contactId;
- UINT16 fieldsPresent;
+ UINT32 fieldsPresent;
INT32 x;
INT32 y;
UINT32 contactFlags;
- INT16 contactRectLeft;
- INT16 contactRectTop;
- INT16 contactRectRight;
- INT16 contactRectBottom;
+ INT32 contactRectLeft;
+ INT32 contactRectTop;
+ INT32 contactRectRight;
+ INT32 contactRectBottom;
UINT32 orientation;
UINT32 pressure;
};
/** @brief a frame containing contact points */
struct _RDPINPUT_TOUCH_FRAME
{
- UINT16 contactCount;
+ UINT32 contactCount;
UINT64 frameOffset;
RDPINPUT_CONTACT_DATA* contacts;
};
void* custom;
pcRdpeiGetVersion GetVersion;
- pcRdpeiGetFeatures GetFeatures;
pcRdpeiAddContact AddContact;
pcRdpeiTouchUpdate TouchUpdate;
pcRdpeiTouchEnd TouchEnd;
+ pcRdpeiSuspendTouch SuspendTouch;
+ pcRdpeiResumeTouch ResumeTouch;
+
+ pcRdpeiGetFeatures GetFeatures;
pcRdpeiAddPen AddPen;
pcRdpeiPen PenBegin;
pcRdpeiPen PenUpdate;
pcRdpeiPen PenEnd;
-
- pcRdpeiSuspendTouch SuspendTouch;
- pcRdpeiResumeTouch ResumeTouch;
};
#endif /* FREERDP_CHANNEL_RDPEI_CLIENT_RDPEI_H */