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
b58a899a
Commit
b58a899a
authored
Jul 06, 2020
by
Rémi Bernon
Committed by
Alexandre Julliard
Jul 07, 2020
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
user32/tests: Add more GetRawInputData tests.
Signed-off-by:
Rémi Bernon
<
rbernon@codeweavers.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
c8d74874
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
37 additions
and
1 deletion
+37
-1
input.c
dlls/user32/tests/input.c
+37
-1
No files found.
dlls/user32/tests/input.c
View file @
b58a899a
...
...
@@ -1757,8 +1757,11 @@ static void test_GetRawInputData(void)
UINT
ret
;
/* Null raw input handle */
SetLastError
(
0xdeadbeef
);
ret
=
GetRawInputData
(
NULL
,
RID_INPUT
,
NULL
,
&
size
,
sizeof
(
RAWINPUTHEADER
));
ok
(
ret
==
~
0U
,
"Expect ret %u, got %u
\n
"
,
~
0U
,
ret
);
todo_wine
ok
(
GetLastError
()
==
ERROR_INVALID_HANDLE
,
"GetRawInputData returned %08x
\n
"
,
GetLastError
());
}
static
void
test_RegisterRawInputDevices
(
void
)
...
...
@@ -1906,14 +1909,47 @@ static LRESULT CALLBACK rawinputbuffer_wndproc(HWND hwnd, UINT msg, WPARAM wpara
* from the first message has been overwritten. */
size
=
sizeof
(
ri
);
memset
(
&
ri
,
0
,
sizeof
(
ri
));
count
=
GetRawInputData
((
HRAWINPUT
)
lparam
,
RID_INPUT
,
&
ri
,
&
size
,
sizeof
(
RAWINPUTHEADER
));
SetLastError
(
0xdeadbeef
);
count
=
GetRawInputData
((
HRAWINPUT
)
lparam
,
RID_HEADER
,
&
ri
,
&
size
,
sizeof
(
RAWINPUTHEADER
));
if
(
iteration
==
1
)
{
SetLastError
(
0xdeadbeef
);
count
=
GetRawInputData
((
HRAWINPUT
)
lparam
,
RID_INPUT
,
&
ri
,
&
size
,
0
);
ok
(
count
==
~
0U
,
"GetRawInputData succeeded
\n
"
);
todo_wine
ok
(
GetLastError
()
==
ERROR_INVALID_PARAMETER
,
"GetRawInputData returned %08x
\n
"
,
GetLastError
());
SetLastError
(
0xdeadbeef
);
size
=
0
;
count
=
GetRawInputData
((
HRAWINPUT
)
lparam
,
RID_INPUT
,
&
ri
,
&
size
,
sizeof
(
RAWINPUTHEADER
));
ok
(
count
==
~
0U
,
"GetRawInputData succeeded
\n
"
);
todo_wine
ok
(
GetLastError
()
==
ERROR_INSUFFICIENT_BUFFER
,
"GetRawInputData returned %08x
\n
"
,
GetLastError
());
SetLastError
(
0xdeadbeef
);
size
=
sizeof
(
ri
);
count
=
GetRawInputData
((
HRAWINPUT
)
lparam
,
0
,
&
ri
,
&
size
,
sizeof
(
RAWINPUTHEADER
));
ok
(
count
==
~
0U
,
"GetRawInputData succeeded
\n
"
);
todo_wine
ok
(
GetLastError
()
==
ERROR_INVALID_PARAMETER
,
"GetRawInputData returned %08x
\n
"
,
GetLastError
());
SetLastError
(
0xdeadbeef
);
size
=
sizeof
(
ri
);
count
=
GetRawInputData
((
HRAWINPUT
)
lparam
,
RID_INPUT
,
&
ri
,
&
size
,
sizeof
(
RAWINPUTHEADER
));
todo_wine
ok
(
count
==
sizeof
(
ri
),
"GetRawInputData failed
\n
"
);
todo_wine
ok
(
ri
.
data
.
mouse
.
lLastX
==
6
,
"Unexpected rawinput data: %d
\n
"
,
ri
.
data
.
mouse
.
lLastX
);
ok
(
GetLastError
()
==
0xdeadbeef
,
"GetRawInputData returned %08x
\n
"
,
GetLastError
());
}
else
{
ok
(
count
==
~
0U
,
"GetRawInputData succeeded
\n
"
);
todo_wine
ok
(
GetLastError
()
==
ERROR_INVALID_HANDLE
,
"GetRawInputData returned %08x
\n
"
,
GetLastError
());
}
return
0
;
}
return
DefWindowProcA
(
hwnd
,
msg
,
wparam
,
lparam
);
...
...
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