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
da8a36c5
Commit
da8a36c5
authored
Aug 30, 2022
by
Andrey Gusev
Committed by
Alexandre Julliard
Sep 01, 2022
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
user32: Implement DefRawInputProc.
Used in The Testament of Sherlock Holmes on mouse move.
parent
46740a23
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
22 additions
and
2 deletions
+22
-2
input.c
dlls/user32/input.c
+2
-2
input.c
dlls/user32/tests/input.c
+20
-0
No files found.
dlls/user32/input.c
View file @
da8a36c5
...
@@ -649,7 +649,7 @@ UINT WINAPI GetRawInputDeviceInfoA( HANDLE device, UINT command, void *data, UIN
...
@@ -649,7 +649,7 @@ UINT WINAPI GetRawInputDeviceInfoA( HANDLE device, UINT command, void *data, UIN
*/
*/
LRESULT
WINAPI
DefRawInputProc
(
RAWINPUT
**
data
,
INT
data_count
,
UINT
header_size
)
LRESULT
WINAPI
DefRawInputProc
(
RAWINPUT
**
data
,
INT
data_count
,
UINT
header_size
)
{
{
FIXME
(
"data %p, data_count %d, header_size %u stub!
\n
"
,
data
,
data_count
,
header_size
);
TRACE
(
"data %p, data_count %d, header_size %u.
\n
"
,
data
,
data_count
,
header_size
);
return
0
;
return
header_size
==
sizeof
(
RAWINPUTHEADER
)
?
0
:
-
1
;
}
}
dlls/user32/tests/input.c
View file @
da8a36c5
...
@@ -2900,6 +2900,25 @@ static void test_rawinput(const char* argv0)
...
@@ -2900,6 +2900,25 @@ static void test_rawinput(const char* argv0)
CloseDesktop
(
params
.
desk
);
CloseDesktop
(
params
.
desk
);
}
}
static
void
test_DefRawInputProc
(
void
)
{
LRESULT
ret
;
SetLastError
(
0xdeadbeef
);
ret
=
DefRawInputProc
(
NULL
,
0
,
sizeof
(
RAWINPUTHEADER
));
ok
(
!
ret
,
"got %Id
\n
"
,
ret
);
ok
(
GetLastError
()
==
0xdeadbeef
,
"got %ld
\n
"
,
GetLastError
());
ret
=
DefRawInputProc
(
LongToPtr
(
0xcafe
),
0xbeef
,
sizeof
(
RAWINPUTHEADER
));
ok
(
!
ret
,
"got %Id
\n
"
,
ret
);
ok
(
GetLastError
()
==
0xdeadbeef
,
"got %ld
\n
"
,
GetLastError
());
ret
=
DefRawInputProc
(
NULL
,
0
,
sizeof
(
RAWINPUTHEADER
)
-
1
);
ok
(
ret
==
-
1
,
"got %Id
\n
"
,
ret
);
ok
(
GetLastError
()
==
0xdeadbeef
,
"got %ld
\n
"
,
GetLastError
());
ret
=
DefRawInputProc
(
NULL
,
0
,
sizeof
(
RAWINPUTHEADER
)
+
1
);
ok
(
ret
==
-
1
,
"got %Id
\n
"
,
ret
);
ok
(
GetLastError
()
==
0xdeadbeef
,
"got %ld
\n
"
,
GetLastError
());
}
static
void
test_key_map
(
void
)
static
void
test_key_map
(
void
)
{
{
HKL
kl
=
GetKeyboardLayout
(
0
);
HKL
kl
=
GetKeyboardLayout
(
0
);
...
@@ -4589,6 +4608,7 @@ START_TEST(input)
...
@@ -4589,6 +4608,7 @@ START_TEST(input)
test_GetRawInputBuffer
();
test_GetRawInputBuffer
();
test_RegisterRawInputDevices
();
test_RegisterRawInputDevices
();
test_rawinput
(
argv
[
0
]);
test_rawinput
(
argv
[
0
]);
test_DefRawInputProc
();
if
(
pGetMouseMovePointsEx
)
if
(
pGetMouseMovePointsEx
)
test_GetMouseMovePointsEx
(
argv
[
0
]);
test_GetMouseMovePointsEx
(
argv
[
0
]);
...
...
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