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
35ee9b05
Commit
35ee9b05
authored
Oct 15, 2006
by
Vitaliy Margolen
Committed by
Alexandre Julliard
Oct 17, 2006
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
dinput: Add SetCooperativeLevel test for joystick.
parent
d35e4cd8
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
23 additions
and
0 deletions
+23
-0
joystick.c
dlls/dinput/tests/joystick.c
+23
-0
No files found.
dlls/dinput/tests/joystick.c
View file @
35ee9b05
...
...
@@ -123,6 +123,18 @@ static BOOL CALLBACK EnumAxes(
return
DIENUM_CONTINUE
;
}
static
const
HRESULT
SetCoop_null_window
[
16
]
=
{
E_INVALIDARG
,
E_INVALIDARG
,
E_INVALIDARG
,
E_INVALIDARG
,
E_INVALIDARG
,
E_HANDLE
,
E_HANDLE
,
E_INVALIDARG
,
E_INVALIDARG
,
E_HANDLE
,
S_OK
,
E_INVALIDARG
,
E_INVALIDARG
,
E_INVALIDARG
,
E_INVALIDARG
,
E_INVALIDARG
};
static
const
HRESULT
SetCoop_real_window
[
16
]
=
{
E_INVALIDARG
,
E_INVALIDARG
,
E_INVALIDARG
,
E_INVALIDARG
,
E_INVALIDARG
,
S_OK
,
S_OK
,
E_INVALIDARG
,
E_INVALIDARG
,
S_OK
,
S_OK
,
E_INVALIDARG
,
E_INVALIDARG
,
E_INVALIDARG
,
E_INVALIDARG
,
E_INVALIDARG
};
static
BOOL
CALLBACK
EnumJoysticks
(
LPCDIDEVICEINSTANCE
lpddi
,
LPVOID
pvRef
)
...
...
@@ -193,6 +205,17 @@ static BOOL CALLBACK EnumJoysticks(
if
(
hr
!=
DI_OK
)
goto
RELEASE
;
for
(
i
=
0
;
i
<
16
;
i
++
)
{
hr
=
IDirectInputDevice_SetCooperativeLevel
(
pJoystick
,
NULL
,
i
);
ok
(
hr
==
SetCoop_null_window
[
i
],
"SetCooperativeLevel(NULL, %d): %s
\n
"
,
i
,
DXGetErrorString8
(
hr
));
}
for
(
i
=
0
;
i
<
16
;
i
++
)
{
hr
=
IDirectInputDevice_SetCooperativeLevel
(
pJoystick
,
hWnd
,
i
);
ok
(
hr
==
SetCoop_real_window
[
i
],
"SetCooperativeLevel(hwnd, %d): %s
\n
"
,
i
,
DXGetErrorString8
(
hr
));
}
hr
=
IDirectInputDevice_SetCooperativeLevel
(
pJoystick
,
hWnd
,
DISCL_NONEXCLUSIVE
|
DISCL_BACKGROUND
);
ok
(
hr
==
DI_OK
,
"IDirectInputDevice_SetCooperativeLevel() failed: %s
\n
"
,
...
...
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