Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-winehq
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wine
wine-winehq
Commits
e2bd6f36
Commit
e2bd6f36
authored
Oct 21, 2004
by
Robert North
Committed by
Alexandre Julliard
Oct 21, 2004
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix WTInfoA in wintab.c so it can now take lpOutput == NULL, as per
standard.
parent
5d0366f5
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
25 additions
and
14 deletions
+25
-14
wintab.c
dlls/x11drv/wintab.c
+25
-14
No files found.
dlls/x11drv/wintab.c
View file @
e2bd6f36
...
...
@@ -746,7 +746,12 @@ int X11DRV_GetCurrentPacket(LPWTPACKET *packet)
int
static
inline
CopyTabletData
(
LPVOID
target
,
LPVOID
src
,
INT
size
)
{
memcpy
(
target
,
src
,
size
);
/*
* It is valid to call CopyTabletData with NULL.
* This handles the WTInfo() case where lpOutput is null.
*/
if
(
target
!=
NULL
)
memcpy
(
target
,
src
,
size
);
return
(
size
);
}
...
...
@@ -755,6 +760,14 @@ int static inline CopyTabletData(LPVOID target, LPVOID src, INT size)
*/
UINT
X11DRV_WTInfoA
(
UINT
wCategory
,
UINT
nIndex
,
LPVOID
lpOutput
)
{
/*
* It is valid to call WTInfoA with lpOutput == NULL, as per standard.
* lpOutput == NULL signifies the user only wishes
* to find the size of the data.
* NOTE:
* From now on use CopyTabletData to fill lpOutput. memcpy will break
* the code.
*/
int
rc
=
0
;
LPWTI_CURSORS_INFO
tgtcursor
;
TRACE
(
"(%u, %u, %p)
\n
"
,
wCategory
,
nIndex
,
lpOutput
);
...
...
@@ -799,9 +812,8 @@ UINT X11DRV_WTInfoA(UINT wCategory, UINT nIndex, LPVOID lpOutput)
switch
(
nIndex
)
{
case
0
:
memcpy
(
lpOutput
,
&
gSysContext
,
rc
=
CopyTabletData
(
lpOutput
,
&
gSysContext
,
sizeof
(
LOGCONTEXTA
));
rc
=
sizeof
(
LOGCONTEXTA
);
break
;
case
CTX_NAME
:
rc
=
CopyTabletData
(
lpOutput
,
&
gSysContext
.
lcName
,
...
...
@@ -988,8 +1000,8 @@ UINT X11DRV_WTInfoA(UINT wCategory, UINT nIndex, LPVOID lpOutput)
sizeof
(
BYTE
)
*
32
);
break
;
case
CSR_NPBTNMARKS
:
memcpy
(
lpOutput
,
&
tgtcursor
->
NPBTNMARKS
,
sizeof
(
UINT
)
*
2
);
rc
=
sizeof
(
UINT
)
*
2
;
rc
=
CopyTabletData
(
lpOutput
,
&
tgtcursor
->
NPBTNMARKS
,
sizeof
(
UINT
)
*
2
)
;
break
;
case
CSR_NPBUTTON
:
rc
=
CopyTabletData
(
lpOutput
,
&
tgtcursor
->
NPBUTTON
,
...
...
@@ -1004,8 +1016,8 @@ UINT X11DRV_WTInfoA(UINT wCategory, UINT nIndex, LPVOID lpOutput)
sizeof
(
BYTE
));
break
;
case
CSR_TPBTNMARKS
:
memcpy
(
lpOutput
,
&
tgtcursor
->
TPBTNMARKS
,
sizeof
(
UINT
)
*
2
);
rc
=
sizeof
(
UINT
)
*
2
;
rc
=
CopyTabletData
(
lpOutput
,
&
tgtcursor
->
TPBTNMARKS
,
sizeof
(
UINT
)
*
2
)
;
break
;
case
CSR_TPRESPONSE
:
FIXME
(
"Not returning CSR_TPRESPONSE correctly
\n
"
);
...
...
@@ -1014,10 +1026,9 @@ UINT X11DRV_WTInfoA(UINT wCategory, UINT nIndex, LPVOID lpOutput)
case
CSR_PHYSID
:
{
DWORD
id
;
rc
=
CopyTabletData
(
&
id
,
&
tgtcursor
->
PHYSID
,
sizeof
(
DWORD
));
id
=
tgtcursor
->
PHYSID
;
id
+=
(
wCategory
-
WTI_CURSORS
);
memcpy
(
lpOutput
,
&
id
,
sizeof
(
DWORD
));
rc
=
CopyTabletData
(
lpOutput
,
&
id
,
sizeof
(
DWORD
));
}
break
;
case
CSR_MODE
:
...
...
@@ -1121,14 +1132,14 @@ UINT X11DRV_WTInfoA(UINT wCategory, UINT nIndex, LPVOID lpOutput)
*/
break
;
case
DVC_ORIENTATION
:
memcpy
(
lpOutput
,
&
gSysDevice
.
ORIENTATION
,
sizeof
(
AXIS
)
*
3
);
rc
=
sizeof
(
AXIS
)
*
3
;
rc
=
CopyTabletData
(
lpOutput
,
&
gSysDevice
.
ORIENTATION
,
sizeof
(
AXIS
)
*
3
)
;
break
;
case
DVC_ROTATION
:
rc
=
0
;
/* unsupported */
/*
memcpy(lpOutput,&gSysDevice.ROTATION,sizeof(AXIS)*3);
rc = sizeof(AXIS)*3
;
rc = CopyTabletData(lpOutput,&gSysDevice.ROTATION,
sizeof(AXIS)*3)
;
*/
break
;
case
DVC_PNPID
:
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment