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
c4debff5
Commit
c4debff5
authored
May 17, 2019
by
Alistair Leslie-Hughes
Committed by
Alexandre Julliard
May 17, 2019
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
dinput: Improve returned flags in Mouse GetObjectInfo.
Signed-off-by:
Alistair Leslie-Hughes
<
leslie_alistair@hotmail.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
099b05ce
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
34 additions
and
0 deletions
+34
-0
mouse.c
dlls/dinput/mouse.c
+3
-0
mouse.c
dlls/dinput/tests/mouse.c
+31
-0
No files found.
dlls/dinput/mouse.c
View file @
c4debff5
...
...
@@ -730,6 +730,9 @@ static HRESULT WINAPI SysMouseWImpl_GetObjectInfo(LPDIRECTINPUTDEVICE8W iface,
else
if
(
pdidoi
->
dwType
&
DIDFT_BUTTON
)
wsprintfW
(
pdidoi
->
tszName
,
buttonW
,
DIDFT_GETINSTANCE
(
pdidoi
->
dwType
)
-
3
);
if
(
pdidoi
->
dwType
&
DIDFT_AXIS
)
pdidoi
->
dwFlags
|=
DIDOI_ASPECTPOSITION
;
_dump_OBJECTINSTANCEW
(
pdidoi
);
return
res
;
}
...
...
dlls/dinput/tests/mouse.c
View file @
c4debff5
...
...
@@ -227,6 +227,36 @@ static void test_GetDeviceInfo(IDirectInputA *pDI)
if
(
pMouse
)
IUnknown_Release
(
pMouse
);
}
static
BOOL
CALLBACK
EnumAxes
(
const
DIDEVICEOBJECTINSTANCEA
*
pdidoi
,
void
*
pContext
)
{
if
(
IsEqualIID
(
&
pdidoi
->
guidType
,
&
GUID_XAxis
)
||
IsEqualIID
(
&
pdidoi
->
guidType
,
&
GUID_YAxis
)
||
IsEqualIID
(
&
pdidoi
->
guidType
,
&
GUID_ZAxis
))
{
ok
(
pdidoi
->
dwFlags
&
DIDOI_ASPECTPOSITION
,
"Missing DIDOI_ASPECTPOSITION, flags are 0x%x
\n
"
,
pdidoi
->
dwFlags
);
}
else
ok
(
pdidoi
->
dwFlags
==
0
,
"Flags are 0x%x
\n
"
,
pdidoi
->
dwFlags
);
return
DIENUM_CONTINUE
;
}
static
void
test_mouse_EnumObjects
(
IDirectInputA
*
pDI
)
{
HRESULT
hr
;
IDirectInputDeviceA
*
pMouse
=
NULL
;
hr
=
IDirectInput_CreateDevice
(
pDI
,
&
GUID_SysMouse
,
&
pMouse
,
NULL
);
ok
(
SUCCEEDED
(
hr
),
"IDirectInput_CreateDevice() failed: %08x
\n
"
,
hr
);
if
(
FAILED
(
hr
))
return
;
hr
=
IDirectInputDevice_EnumObjects
(
pMouse
,
EnumAxes
,
NULL
,
DIDFT_ALL
);
ok
(
hr
==
DI_OK
,
"IDirectInputDevice_EnumObjects() failed: %08x
\n
"
,
hr
);
if
(
pMouse
)
IUnknown_Release
(
pMouse
);
}
static
void
mouse_tests
(
void
)
{
HRESULT
hr
;
...
...
@@ -254,6 +284,7 @@ static void mouse_tests(void)
test_set_coop
(
pDI
,
hwnd
);
test_acquire
(
pDI
,
hwnd
);
test_GetDeviceInfo
(
pDI
);
test_mouse_EnumObjects
(
pDI
);
DestroyWindow
(
hwnd
);
}
...
...
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