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
e7b3e351
Commit
e7b3e351
authored
Mar 16, 2023
by
Rémi Bernon
Committed by
Alexandre Julliard
Mar 16, 2023
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
dinput/tests: Test SaveActionMap effect on DIPROP_RANGE property.
parent
4edea8a9
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
55 additions
and
0 deletions
+55
-0
joystick8.c
dlls/dinput/tests/joystick8.c
+55
-0
No files found.
dlls/dinput/tests/joystick8.c
View file @
e7b3e351
...
@@ -725,6 +725,15 @@ static void test_action_map( IDirectInputDevice8W *device, HANDLE file, HANDLE e
...
@@ -725,6 +725,15 @@ static void test_action_map( IDirectInputDevice8W *device, HANDLE file, HANDLE e
{.
objid
=
TRUE
},
{.
objid
=
TRUE
},
{.
objid
=
TRUE
,
.
how
=
TRUE
},
{.
objid
=
TRUE
,
.
how
=
TRUE
},
};
};
DIPROPRANGE
prop_range
=
{
.
diph
=
{
.
dwHeaderSize
=
sizeof
(
DIPROPHEADER
),
.
dwSize
=
sizeof
(
DIPROPRANGE
),
.
dwHow
=
DIPH_DEVICE
,
}
};
DIPROPDWORD
prop_dword
=
DIPROPDWORD
prop_dword
=
{
{
.
diph
=
.
diph
=
...
@@ -909,6 +918,24 @@ static void test_action_map( IDirectInputDevice8W *device, HANDLE file, HANDLE e
...
@@ -909,6 +918,24 @@ static void test_action_map( IDirectInputDevice8W *device, HANDLE file, HANDLE e
ok
(
hr
==
DI_OK
,
"GetProperty returned %#lx
\n
"
,
hr
);
ok
(
hr
==
DI_OK
,
"GetProperty returned %#lx
\n
"
,
hr
);
ok
(
prop_pointer
.
uData
==
0
,
"got uData %#Ix
\n
"
,
prop_pointer
.
uData
);
ok
(
prop_pointer
.
uData
==
0
,
"got uData %#Ix
\n
"
,
prop_pointer
.
uData
);
prop_range
.
diph
.
dwHow
=
DIPH_BYID
;
prop_range
.
diph
.
dwObj
=
DIDFT_ABSAXIS
|
DIDFT_MAKEINSTANCE
(
2
);
hr
=
IDirectInputDevice8_GetProperty
(
device
,
DIPROP_RANGE
,
&
prop_range
.
diph
);
ok
(
hr
==
DI_OK
,
"GetProperty returned %#lx
\n
"
,
hr
);
todo_wine
ok
(
prop_range
.
lMin
==
+
1000
,
"got lMin %+ld
\n
"
,
prop_range
.
lMin
);
todo_wine
ok
(
prop_range
.
lMax
==
+
51000
,
"got lMax %+ld
\n
"
,
prop_range
.
lMax
);
prop_range
.
diph
.
dwHow
=
DIPH_BYUSAGE
;
prop_range
.
diph
.
dwObj
=
MAKELONG
(
HID_USAGE_GENERIC_X
,
HID_USAGE_PAGE_GENERIC
);
hr
=
IDirectInputDevice8_GetProperty
(
device
,
DIPROP_RANGE
,
&
prop_range
.
diph
);
ok
(
hr
==
DI_OK
,
"GetProperty returned %#lx
\n
"
,
hr
);
todo_wine
ok
(
prop_range
.
lMin
==
-
14000
,
"got lMin %+ld
\n
"
,
prop_range
.
lMin
);
todo_wine
ok
(
prop_range
.
lMax
==
-
4000
,
"got lMax %+ld
\n
"
,
prop_range
.
lMax
);
hr
=
IDirectInputDevice8_GetProperty
(
device
,
DIPROP_BUFFERSIZE
,
&
prop_dword
.
diph
);
hr
=
IDirectInputDevice8_GetProperty
(
device
,
DIPROP_BUFFERSIZE
,
&
prop_dword
.
diph
);
ok
(
hr
==
DI_OK
,
"GetProperty returned %#lx
\n
"
,
hr
);
ok
(
hr
==
DI_OK
,
"GetProperty returned %#lx
\n
"
,
hr
);
todo_wine
todo_wine
...
@@ -960,6 +987,20 @@ static void test_action_map( IDirectInputDevice8W *device, HANDLE file, HANDLE e
...
@@ -960,6 +987,20 @@ static void test_action_map( IDirectInputDevice8W *device, HANDLE file, HANDLE e
todo_wine
todo_wine
ok
(
prop_pointer
.
uData
==
8
,
"got uData %#Ix
\n
"
,
prop_pointer
.
uData
);
ok
(
prop_pointer
.
uData
==
8
,
"got uData %#Ix
\n
"
,
prop_pointer
.
uData
);
prop_range
.
diph
.
dwHow
=
DIPH_BYID
;
prop_range
.
diph
.
dwObj
=
DIDFT_ABSAXIS
|
DIDFT_MAKEINSTANCE
(
2
);
hr
=
IDirectInputDevice8_GetProperty
(
device
,
DIPROP_RANGE
,
&
prop_range
.
diph
);
ok
(
hr
==
DI_OK
,
"GetProperty returned %#lx
\n
"
,
hr
);
ok
(
prop_range
.
lMin
==
-
128
,
"got lMin %+ld
\n
"
,
prop_range
.
lMin
);
ok
(
prop_range
.
lMax
==
+
128
,
"got lMax %+ld
\n
"
,
prop_range
.
lMax
);
prop_range
.
diph
.
dwHow
=
DIPH_BYUSAGE
;
prop_range
.
diph
.
dwObj
=
MAKELONG
(
HID_USAGE_GENERIC_X
,
HID_USAGE_PAGE_GENERIC
);
hr
=
IDirectInputDevice8_GetProperty
(
device
,
DIPROP_RANGE
,
&
prop_range
.
diph
);
ok
(
hr
==
DI_OK
,
"GetProperty returned %#lx
\n
"
,
hr
);
ok
(
prop_range
.
lMin
==
-
128
,
"got lMin %+ld
\n
"
,
prop_range
.
lMin
);
ok
(
prop_range
.
lMax
==
+
128
,
"got lMax %+ld
\n
"
,
prop_range
.
lMax
);
hr
=
IDirectInputDevice8_GetProperty
(
device
,
DIPROP_BUFFERSIZE
,
&
prop_dword
.
diph
);
hr
=
IDirectInputDevice8_GetProperty
(
device
,
DIPROP_BUFFERSIZE
,
&
prop_dword
.
diph
);
ok
(
hr
==
DI_OK
,
"GetProperty returned %#lx
\n
"
,
hr
);
ok
(
hr
==
DI_OK
,
"GetProperty returned %#lx
\n
"
,
hr
);
ok
(
prop_dword
.
dwData
==
32
,
"got dwData %#lx
\n
"
,
prop_dword
.
dwData
);
ok
(
prop_dword
.
dwData
==
32
,
"got dwData %#lx
\n
"
,
prop_dword
.
dwData
);
...
@@ -1008,6 +1049,20 @@ static void test_action_map( IDirectInputDevice8W *device, HANDLE file, HANDLE e
...
@@ -1008,6 +1049,20 @@ static void test_action_map( IDirectInputDevice8W *device, HANDLE file, HANDLE e
todo_wine
todo_wine
ok
(
prop_pointer
.
uData
==
-
1
,
"got uData %#Ix
\n
"
,
prop_pointer
.
uData
);
ok
(
prop_pointer
.
uData
==
-
1
,
"got uData %#Ix
\n
"
,
prop_pointer
.
uData
);
prop_range
.
diph
.
dwHow
=
DIPH_BYID
;
prop_range
.
diph
.
dwObj
=
DIDFT_ABSAXIS
|
DIDFT_MAKEINSTANCE
(
2
);
hr
=
IDirectInputDevice8_GetProperty
(
device
,
DIPROP_RANGE
,
&
prop_range
.
diph
);
ok
(
hr
==
DI_OK
,
"GetProperty returned %#lx
\n
"
,
hr
);
ok
(
prop_range
.
lMin
==
-
128
,
"got lMin %+ld
\n
"
,
prop_range
.
lMin
);
ok
(
prop_range
.
lMax
==
+
128
,
"got lMax %+ld
\n
"
,
prop_range
.
lMax
);
prop_range
.
diph
.
dwHow
=
DIPH_BYUSAGE
;
prop_range
.
diph
.
dwObj
=
MAKELONG
(
HID_USAGE_GENERIC_X
,
HID_USAGE_PAGE_GENERIC
);
hr
=
IDirectInputDevice8_GetProperty
(
device
,
DIPROP_RANGE
,
&
prop_range
.
diph
);
ok
(
hr
==
DI_OK
,
"GetProperty returned %#lx
\n
"
,
hr
);
ok
(
prop_range
.
lMin
==
-
128
,
"got lMin %+ld
\n
"
,
prop_range
.
lMin
);
ok
(
prop_range
.
lMax
==
+
128
,
"got lMax %+ld
\n
"
,
prop_range
.
lMax
);
hr
=
IDirectInputDevice8_GetProperty
(
device
,
DIPROP_BUFFERSIZE
,
&
prop_dword
.
diph
);
hr
=
IDirectInputDevice8_GetProperty
(
device
,
DIPROP_BUFFERSIZE
,
&
prop_dword
.
diph
);
ok
(
hr
==
DI_OK
,
"GetProperty returned %#lx
\n
"
,
hr
);
ok
(
hr
==
DI_OK
,
"GetProperty returned %#lx
\n
"
,
hr
);
ok
(
prop_dword
.
dwData
==
32
,
"got dwData %#lx
\n
"
,
prop_dword
.
dwData
);
ok
(
prop_dword
.
dwData
==
32
,
"got dwData %#lx
\n
"
,
prop_dword
.
dwData
);
...
...
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