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
851d38c4
Commit
851d38c4
authored
Aug 28, 2012
by
Lucas Zawacki
Committed by
Alexandre Julliard
Aug 28, 2012
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
dinput8/tests: Test load actions when there's no pre-stored ones.
parent
c19855bc
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
23 additions
and
0 deletions
+23
-0
device.c
dlls/dinput8/tests/device.c
+23
-0
No files found.
dlls/dinput8/tests/device.c
View file @
851d38c4
...
...
@@ -351,6 +351,8 @@ static void test_save_settings(void)
IDirectInputDevice8A
*
pKey
;
static
const
GUID
mapping_guid
=
{
0xcafecafe
,
0x2
,
0x3
,
{
0x4
,
0x5
,
0x6
,
0x7
,
0x8
,
0x9
,
0xa
,
0xb
}
};
static
const
GUID
other_guid
=
{
0xcafe
,
0xcafe
,
0x3
,
{
0x4
,
0x5
,
0x6
,
0x7
,
0x8
,
0x9
,
0xa
,
0xb
}
};
static
DIACTION
actions
[]
=
{
{
0
,
DIKEYBOARD_A
,
0
,
{
"Blam"
}
},
{
1
,
DIKEYBOARD_B
,
0
,
{
"Kapow"
}
}
...
...
@@ -433,6 +435,27 @@ static void test_save_settings(void)
"Mapped incorrectly expected: 0x%08x got: 0x%08x
\n
"
,
results
[
1
],
af
.
rgoAction
[
1
].
dwObjID
);
ok
(
IsEqualGUID
(
&
GUID_SysKeyboard
,
&
af
.
rgoAction
[
1
].
guidInstance
),
"Action should be mapped to keyboard
\n
"
);
/* Test that a different action map with no pre-stored settings, in spite of the flags,
does not try to load mappings and instead applies the default mapping */
af
.
guidActionMap
=
other_guid
;
af
.
rgoAction
[
0
].
dwObjID
=
0
;
af
.
rgoAction
[
1
].
dwObjID
=
0
;
memset
(
&
af
.
rgoAction
[
0
].
guidInstance
,
0
,
sizeof
(
GUID
));
memset
(
&
af
.
rgoAction
[
1
].
guidInstance
,
0
,
sizeof
(
GUID
));
hr
=
IDirectInputDevice8_BuildActionMap
(
pKey
,
&
af
,
NULL
,
0
);
ok
(
SUCCEEDED
(
hr
),
"BuildActionMap failed hr=%08x
\n
"
,
hr
);
todo_wine
ok
(
results
[
0
]
==
af
.
rgoAction
[
0
].
dwObjID
,
"Mapped incorrectly expected: 0x%08x got: 0x%08x
\n
"
,
results
[
0
],
af
.
rgoAction
[
0
].
dwObjID
);
todo_wine
ok
(
IsEqualGUID
(
&
GUID_SysKeyboard
,
&
af
.
rgoAction
[
0
].
guidInstance
),
"Action should be mapped to keyboard
\n
"
);
todo_wine
ok
(
results
[
1
]
==
af
.
rgoAction
[
1
].
dwObjID
,
"Mapped incorrectly expected: 0x%08x got: 0x%08x
\n
"
,
results
[
1
],
af
.
rgoAction
[
1
].
dwObjID
);
todo_wine
ok
(
IsEqualGUID
(
&
GUID_SysKeyboard
,
&
af
.
rgoAction
[
1
].
guidInstance
),
"Action should be mapped to keyboard
\n
"
);
af
.
guidActionMap
=
mapping_guid
;
/* Hard case. Customized mapping, save, ask for previous map and read it back */
af
.
rgoAction
[
0
].
dwObjID
=
other_results
[
0
];
af
.
rgoAction
[
0
].
dwHow
=
DIAH_USERCONFIG
;
...
...
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