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
8cc44cb8
Commit
8cc44cb8
authored
Jul 21, 2011
by
Lucas Fialho Zawacki
Committed by
Alexandre Julliard
Jul 22, 2011
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
dinput: SetActionMap setting the axis range according to the action format.
parent
79bd7249
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
23 additions
and
0 deletions
+23
-0
device.c
dlls/dinput/device.c
+8
-0
device.c
dlls/dinput8/tests/device.c
+15
-0
No files found.
dlls/dinput/device.c
View file @
8cc44cb8
...
...
@@ -1483,9 +1483,17 @@ HRESULT WINAPI IDirectInputDevice8WImpl_SetActionMap(LPDIRECTINPUTDEVICE8W iface
DWORD
dwFlags
)
{
DIPROPDWORD
dp
;
DIPROPRANGE
dpr
;
FIXME
(
"(%p)->(%p,%s,%08x): semi-stub !
\n
"
,
iface
,
lpdiaf
,
debugstr_w
(
lpszUserName
),
dwFlags
);
dpr
.
diph
.
dwSize
=
sizeof
(
DIPROPRANGE
);
dpr
.
lMin
=
lpdiaf
->
lAxisMin
;
dpr
.
lMax
=
lpdiaf
->
lAxisMax
;
dpr
.
diph
.
dwHeaderSize
=
sizeof
(
DIPROPHEADER
);
dpr
.
diph
.
dwHow
=
DIPH_DEVICE
;
IDirectInputDevice8_SetProperty
(
iface
,
DIPROP_RANGE
,
&
dpr
.
diph
);
if
(
lpdiaf
->
dwBufferSize
>
0
)
{
dp
.
diph
.
dwSize
=
sizeof
(
DIPROPDWORD
);
...
...
dlls/dinput8/tests/device.c
View file @
8cc44cb8
...
...
@@ -132,6 +132,7 @@ static BOOL CALLBACK enumeration_callback(
{
HRESULT
hr
;
DIPROPDWORD
dp
;
DIPROPRANGE
dpr
;
struct
enum_data
*
data
=
pvRef
;
if
(
!
data
)
return
DIENUM_CONTINUE
;
...
...
@@ -179,6 +180,20 @@ static BOOL CALLBACK enumeration_callback(
ok
(
SUCCEEDED
(
hr
),
"GetProperty failed hr=%08x
\n
"
,
hr
);
ok
(
dp
.
dwData
==
data
->
lpdiaf
->
dwBufferSize
,
"SetActionMap must set the buffer, buffersize=%d
\n
"
,
dp
.
dwData
);
/* Test axis range */
memset
(
&
dpr
,
0
,
sizeof
(
dpr
));
dpr
.
diph
.
dwSize
=
sizeof
(
dpr
);
dpr
.
diph
.
dwHeaderSize
=
sizeof
(
DIPROPHEADER
);
dpr
.
diph
.
dwHow
=
DIPH_DEVICE
;
hr
=
IDirectInputDevice_GetProperty
(
lpdid
,
DIPROP_RANGE
,
&
dpr
.
diph
);
/* Only test if device supports the range property */
if
(
SUCCEEDED
(
hr
))
{
ok
(
dpr
.
lMin
==
data
->
lpdiaf
->
lAxisMin
,
"SetActionMap must set the min axis range expected=%d got=%d
\n
"
,
data
->
lpdiaf
->
lAxisMin
,
dpr
.
lMin
);
ok
(
dpr
.
lMax
==
data
->
lpdiaf
->
lAxisMax
,
"SetActionMap must set the max axis range expected=%d got=%d
\n
"
,
data
->
lpdiaf
->
lAxisMax
,
dpr
.
lMax
);
}
/* SetActionMap has set the data format so now it should work */
hr
=
IDirectInputDevice8_Acquire
(
lpdid
);
ok
(
SUCCEEDED
(
hr
),
"Acquire failed hr=%08x
\n
"
,
hr
);
...
...
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