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
381fa00b
Commit
381fa00b
authored
May 04, 2019
by
Alistair Leslie-Hughes
Committed by
Alexandre Julliard
May 06, 2019
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
dinput: Support DIDEVICEINSTANCE_DX3 for Mouse GetDeviceInfo.
Signed-off-by:
Alistair Leslie-Hughes
<
leslie_alistair@hotmail.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
f3259ba6
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
30 additions
and
5 deletions
+30
-5
mouse.c
dlls/dinput/mouse.c
+0
-5
mouse.c
dlls/dinput/tests/mouse.c
+30
-0
No files found.
dlls/dinput/mouse.c
View file @
381fa00b
...
...
@@ -765,11 +765,6 @@ static HRESULT WINAPI SysMouseAImpl_GetDeviceInfo(
SysMouseImpl
*
This
=
impl_from_IDirectInputDevice8A
(
iface
);
TRACE
(
"(this=%p,%p)
\n
"
,
This
,
pdidi
);
if
(
pdidi
->
dwSize
!=
sizeof
(
DIDEVICEINSTANCEA
))
{
WARN
(
" dinput3 not supported yet...
\n
"
);
return
DI_OK
;
}
fill_mouse_dideviceinstanceA
(
pdidi
,
This
->
base
.
dinput
->
dwVersion
);
return
DI_OK
;
...
...
dlls/dinput/tests/mouse.c
View file @
381fa00b
...
...
@@ -198,6 +198,35 @@ static void test_acquire(IDirectInputA *pDI, HWND hwnd)
DestroyWindow
(
hwnd2
);
}
static
void
test_GetDeviceInfo
(
IDirectInputA
*
pDI
)
{
HRESULT
hr
;
IDirectInputDeviceA
*
pMouse
=
NULL
;
DIDEVICEINSTANCEA
instA
;
DIDEVICEINSTANCE_DX3A
inst3A
;
hr
=
IDirectInput_CreateDevice
(
pDI
,
&
GUID_SysMouse
,
&
pMouse
,
NULL
);
ok
(
SUCCEEDED
(
hr
),
"IDirectInput_CreateDevice() failed: %08x
\n
"
,
hr
);
if
(
FAILED
(
hr
))
return
;
instA
.
dwSize
=
sizeof
(
instA
);
hr
=
IDirectInputDevice_GetDeviceInfo
(
pMouse
,
&
instA
);
ok
(
SUCCEEDED
(
hr
),
"got %08x
\n
"
,
hr
);
inst3A
.
dwSize
=
sizeof
(
inst3A
);
hr
=
IDirectInputDevice_GetDeviceInfo
(
pMouse
,
(
DIDEVICEINSTANCEA
*
)
&
inst3A
);
ok
(
SUCCEEDED
(
hr
),
"got %08x
\n
"
,
hr
);
ok
(
instA
.
dwSize
!=
inst3A
.
dwSize
,
"got %d, %d
\n
"
,
instA
.
dwSize
,
inst3A
.
dwSize
);
ok
(
IsEqualGUID
(
&
instA
.
guidInstance
,
&
inst3A
.
guidInstance
),
"got %s, %s
\n
"
,
wine_dbgstr_guid
(
&
instA
.
guidInstance
),
wine_dbgstr_guid
(
&
inst3A
.
guidInstance
)
);
ok
(
IsEqualGUID
(
&
instA
.
guidProduct
,
&
inst3A
.
guidProduct
),
"got %s, %s
\n
"
,
wine_dbgstr_guid
(
&
instA
.
guidProduct
),
wine_dbgstr_guid
(
&
inst3A
.
guidProduct
)
);
ok
(
instA
.
dwDevType
==
inst3A
.
dwDevType
,
"got %d, %d
\n
"
,
instA
.
dwDevType
,
inst3A
.
dwDevType
);
if
(
pMouse
)
IUnknown_Release
(
pMouse
);
}
static
void
mouse_tests
(
void
)
{
HRESULT
hr
;
...
...
@@ -224,6 +253,7 @@ static void mouse_tests(void)
test_set_coop
(
pDI
,
hwnd
);
test_acquire
(
pDI
,
hwnd
);
test_GetDeviceInfo
(
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