mirror of
https://gitlab.winehq.org/wine/wine.git
synced 2024-11-21 17:09:06 -07:00
wintab32: Align WTPACKET for 32/64-bit archs.
WTPACKET's structure is never directly exposed via the API; it's internal to Wine. The HCTX value is only used on the wintab32 side, not the driver side, and it is used as an integer rather than a pointer, so this should be safe to do. This eliminates the need to have a wow64 thunk for tablet_get_packet.
This commit is contained in:
parent
ea3c73b12d
commit
5b10f924fa
Notes:
Alexandre Julliard
2024-11-13 22:29:58 +01:00
Approved-by: Alexandre Julliard (@julliard) Merge-Request: https://gitlab.winehq.org/wine/wine/merge_requests/6584
3 changed files with 8 additions and 5 deletions
|
@ -236,7 +236,7 @@ typedef struct tagWTI_DEVICES_INFO
|
|||
#define CSR_TYPE_OTHER 0x000
|
||||
|
||||
typedef struct tagWTPACKET {
|
||||
HCTX pkContext;
|
||||
UINT pkContext;
|
||||
UINT pkStatus;
|
||||
LONG pkTime;
|
||||
WTPKT pkChanged;
|
||||
|
|
|
@ -102,7 +102,7 @@ static const char* DUMPBITS(int x)
|
|||
|
||||
static inline void DUMPPACKET(WTPACKET packet)
|
||||
{
|
||||
TRACE("pkContext: %p pkStatus: 0x%x pkTime : 0x%lx pkChanged: 0x%lx pkSerialNumber: 0x%x pkCursor : %i pkButtons: %lx pkX: %li pkY: %li pkZ: %li pkNormalPressure: %i pkTangentPressure: %i pkOrientation: (%i,%i,%i) pkRotation: (%i,%i,%i)\n",
|
||||
TRACE("pkContext: 0x%x pkStatus: 0x%x pkTime : 0x%lx pkChanged: 0x%lx pkSerialNumber: 0x%x pkCursor : %i pkButtons: %lx pkX: %li pkY: %li pkZ: %li pkNormalPressure: %i pkTangentPressure: %i pkOrientation: (%i,%i,%i) pkRotation: (%i,%i,%i)\n",
|
||||
packet.pkContext, packet.pkStatus, packet.pkTime, packet.pkChanged, packet.pkSerialNumber,
|
||||
packet.pkCursor, packet.pkButtons, packet.pkX, packet.pkY, packet.pkZ,
|
||||
packet.pkNormalPressure, packet.pkTangentPressure,
|
||||
|
@ -205,7 +205,7 @@ LPOPENCONTEXT AddPacketToContextQueue(LPWTPACKET packet, HWND hwnd)
|
|||
|
||||
tgt = ptr->PacketsQueued;
|
||||
|
||||
packet->pkContext = ptr->handle;
|
||||
packet->pkContext = HandleToULong(ptr->handle);
|
||||
|
||||
/* translate packet data to the context */
|
||||
packet->pkChanged = packet->pkChanged & ptr->context.lcPktData;
|
||||
|
@ -296,12 +296,15 @@ static LPVOID TABLET_CopyPacketData(LPOPENCONTEXT context, LPVOID lpPkt,
|
|||
LPWTPACKET wtp)
|
||||
{
|
||||
LPBYTE ptr;
|
||||
HCTX ctx;
|
||||
|
||||
ptr = lpPkt;
|
||||
TRACE("Packet Bits %s\n",DUMPBITS(context->context.lcPktData));
|
||||
|
||||
ctx = ULongToHandle(wtp->pkContext);
|
||||
|
||||
if (context->context.lcPktData & PK_CONTEXT)
|
||||
ptr+=CopyTabletData(ptr,&wtp->pkContext,sizeof(HCTX));
|
||||
ptr+=CopyTabletData(ptr,&ctx,sizeof(HCTX));
|
||||
if (context->context.lcPktData & PK_STATUS)
|
||||
ptr+=CopyTabletData(ptr,&wtp->pkStatus,sizeof(UINT));
|
||||
if (context->context.lcPktData & PK_TIME)
|
||||
|
|
|
@ -117,7 +117,7 @@ typedef struct tagWTI_EXTENSIONS_INFO
|
|||
} WTI_EXTENSIONS_INFO, *LPWTI_EXTENSIONS_INFO;
|
||||
|
||||
typedef struct tagWTPACKET {
|
||||
HCTX pkContext;
|
||||
UINT pkContext;
|
||||
UINT pkStatus;
|
||||
LONG pkTime;
|
||||
WTPKT pkChanged;
|
||||
|
|
Loading…
Reference in a new issue