Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-cw
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-cw
Commits
50c1f454
Commit
50c1f454
authored
Sep 28, 2021
by
Rémi Bernon
Committed by
Alexandre Julliard
Sep 28, 2021
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
dinput: Return DIERR_NOTFOUND when DIPROP_RANGE object isn't found.
Signed-off-by:
Rémi Bernon
<
rbernon@codeweavers.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
5f6edba5
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
4 additions
and
6 deletions
+4
-6
joystick_hid.c
dlls/dinput/joystick_hid.c
+4
-3
hid.c
dlls/dinput8/tests/hid.c
+0
-3
No files found.
dlls/dinput/joystick_hid.c
View file @
50c1f454
...
...
@@ -515,7 +515,7 @@ static BOOL get_property_prop_range( struct hid_joystick *impl, struct hid_caps
DIPROPRANGE
*
value
=
data
;
value
->
lMin
=
value_caps
->
PhysicalMin
;
value
->
lMax
=
value_caps
->
PhysicalMax
;
return
DIENUM_
CONTINUE
;
return
DIENUM_
STOP
;
}
static
HRESULT
WINAPI
hid_joystick_GetProperty
(
IDirectInputDevice8W
*
iface
,
const
GUID
*
guid
,
...
...
@@ -533,8 +533,9 @@ static HRESULT WINAPI hid_joystick_GetProperty( IDirectInputDevice8W *iface, con
{
case
(
DWORD_PTR
)
DIPROP_RANGE
:
if
(
header
->
dwSize
!=
sizeof
(
DIPROPRANGE
))
return
DIERR_INVALIDPARAM
;
enum_objects
(
impl
,
header
,
DIDFT_AXIS
,
get_property_prop_range
,
header
);
return
DI_OK
;
if
(
enum_objects
(
impl
,
header
,
DIDFT_AXIS
,
get_property_prop_range
,
header
)
==
DIENUM_STOP
)
return
DI_OK
;
return
DIERR_NOTFOUND
;
case
(
DWORD_PTR
)
DIPROP_PRODUCTNAME
:
{
DIPROPSTRING
*
value
=
(
DIPROPSTRING
*
)
header
;
...
...
dlls/dinput8/tests/hid.c
View file @
50c1f454
...
...
@@ -3908,15 +3908,12 @@ static void test_simple_joystick(void)
prop_range
.
lMin
=
0xdeadbeef
;
prop_range
.
lMax
=
0xdeadbeef
;
hr
=
IDirectInputDevice8_GetProperty
(
device
,
DIPROP_RANGE
,
&
prop_range
.
diph
);
todo_wine
ok
(
hr
==
DIERR_NOTFOUND
,
"IDirectInputDevice8_GetProperty DIPROP_RANGE returned %#x
\n
"
,
hr
);
prop_range
.
diph
.
dwObj
=
MAKELONG
(
0
,
HID_USAGE_PAGE_GENERIC
);
hr
=
IDirectInputDevice8_GetProperty
(
device
,
DIPROP_RANGE
,
&
prop_range
.
diph
);
todo_wine
ok
(
hr
==
DIERR_NOTFOUND
,
"IDirectInputDevice8_GetProperty DIPROP_RANGE returned %#x
\n
"
,
hr
);
prop_range
.
diph
.
dwObj
=
MAKELONG
(
HID_USAGE_PAGE_GENERIC
,
HID_USAGE_GENERIC_X
);
hr
=
IDirectInputDevice8_GetProperty
(
device
,
DIPROP_RANGE
,
&
prop_range
.
diph
);
todo_wine
ok
(
hr
==
DIERR_NOTFOUND
,
"IDirectInputDevice8_GetProperty DIPROP_RANGE returned %#x
\n
"
,
hr
);
prop_range
.
diph
.
dwObj
=
MAKELONG
(
HID_USAGE_GENERIC_X
,
HID_USAGE_PAGE_GENERIC
);
prop_range
.
lMin
=
0xdeadbeef
;
...
...
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