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
54b2fc35
Commit
54b2fc35
authored
Sep 21, 2021
by
Rémi Bernon
Committed by
Alexandre Julliard
Sep 21, 2021
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
dinput: Return correct errors from HID joystick IDirectInputDevice8_Poll.
Signed-off-by:
Rémi Bernon
<
rbernon@codeweavers.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
aa43d24c
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
13 additions
and
2 deletions
+13
-2
joystick_hid.c
dlls/dinput/joystick_hid.c
+13
-1
hid.c
dlls/dinput8/tests/hid.c
+0
-1
No files found.
dlls/dinput/joystick_hid.c
View file @
54b2fc35
...
...
@@ -704,6 +704,18 @@ static HRESULT WINAPI hid_joystick_GetDeviceInfo( IDirectInputDevice8W *iface, D
return
S_OK
;
}
static
HRESULT
WINAPI
hid_joystick_Poll
(
IDirectInputDevice8W
*
iface
)
{
struct
hid_joystick
*
impl
=
impl_from_IDirectInputDevice8W
(
iface
);
HRESULT
hr
=
DI_NOEFFECT
;
EnterCriticalSection
(
&
impl
->
base
.
crit
);
if
(
!
impl
->
base
.
acquired
)
hr
=
DIERR_NOTACQUIRED
;
LeaveCriticalSection
(
&
impl
->
base
.
crit
);
return
hr
;
}
static
HRESULT
WINAPI
hid_joystick_BuildActionMap
(
IDirectInputDevice8W
*
iface
,
DIACTIONFORMATW
*
format
,
const
WCHAR
*
username
,
DWORD
flags
)
{
...
...
@@ -756,7 +768,7 @@ static const IDirectInputDevice8WVtbl hid_joystick_vtbl =
IDirectInputDevice2WImpl_SendForceFeedbackCommand
,
IDirectInputDevice2WImpl_EnumCreatedEffectObjects
,
IDirectInputDevice2WImpl_Escape
,
IDirectInputDevice2WImpl
_Poll
,
hid_joystick
_Poll
,
IDirectInputDevice2WImpl_SendDeviceData
,
/*** IDirectInputDevice7 methods ***/
IDirectInputDevice7WImpl_EnumEffectsInFile
,
...
...
dlls/dinput8/tests/hid.c
View file @
54b2fc35
...
...
@@ -4102,7 +4102,6 @@ static void test_simple_joystick(void)
ok
(
hr
==
DI_OK
,
"IDirectInputDevice8_Acquire returned: %#x
\n
"
,
hr
);
hr
=
IDirectInputDevice8_Poll
(
device
);
todo_wine
ok
(
hr
==
DI_NOEFFECT
,
"IDirectInputDevice8_Poll returned: %#x
\n
"
,
hr
);
hr
=
IDirectInputDevice8_GetDeviceState
(
device
,
sizeof
(
DIJOYSTATE2
)
+
1
,
&
state
);
...
...
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