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
7d0ee987
Commit
7d0ee987
authored
Jan 21, 2009
by
Vincent Pelletier
Committed by
Alexandre Julliard
Jan 22, 2009
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
dinput: Add test to show that effects are stopped after Unacquire + Acquire and…
dinput: Add test to show that effects are stopped after Unacquire + Acquire and preserved in dinput.
parent
41be1096
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
40 additions
and
0 deletions
+40
-0
joystick.c
dlls/dinput/tests/joystick.c
+40
-0
No files found.
dlls/dinput/tests/joystick.c
View file @
7d0ee987
...
...
@@ -373,6 +373,8 @@ static BOOL CALLBACK EnumJoysticks(
if
(
effect
)
{
DWORD
effect_status
;
hr
=
IDirectInputEffect_Initialize
(
effect
,
hInstance
,
data
->
version
,
&
GUID_ConstantForce
);
ok
(
hr
==
DI_OK
,
"IDirectInputEffect_Initialize failed: %08x
\n
"
,
hr
);
...
...
@@ -389,6 +391,44 @@ static BOOL CALLBACK EnumJoysticks(
hr
=
IDirectInputEffect_SetParameters
(
effect
,
&
eff
,
DIEP_GAIN
);
ok
(
hr
==
DI_OK
,
"IDirectInputEffect_SetParameters failed: %08x
\n
"
,
hr
);
}
/* Check effect status.
* State: initialy stopped
* start
* State: started
* unacquire, acquire, download
* State: stopped
* start
* State: started
*
* Shows that:
* - effects are stopped after Unacquire + Acquire
* - effects are preserved (Download + Start doesn't complain
* about incomplete effect)
*/
hr
=
IDirectInputEffect_GetEffectStatus
(
effect
,
&
effect_status
);
ok
(
hr
==
DI_OK
,
"IDirectInputEffect_GetEffectStatus() failed: %08x
\n
"
,
hr
);
ok
(
effect_status
==
0
,
"IDirectInputEffect_GetEffectStatus() reported effect as started
\n
"
);
hr
=
IDirectInputEffect_SetParameters
(
effect
,
&
eff
,
DIEP_START
);
ok
(
hr
==
DI_OK
,
"IDirectInputEffect_SetParameters failed: %08x
\n
"
,
hr
);
hr
=
IDirectInputEffect_GetEffectStatus
(
effect
,
&
effect_status
);
ok
(
hr
==
DI_OK
,
"IDirectInputEffect_GetEffectStatus() failed: %08x
\n
"
,
hr
);
todo_wine
ok
(
effect_status
!=
0
,
"IDirectInputEffect_GetEffectStatus() reported effect as stopped
\n
"
);
hr
=
IDirectInputDevice_Unacquire
(
pJoystick
);
ok
(
hr
==
DI_OK
,
"IDirectInputDevice_Unacquire() failed: %08x
\n
"
,
hr
);
hr
=
IDirectInputDevice_Acquire
(
pJoystick
);
ok
(
hr
==
DI_OK
,
"IDirectInputDevice_Acquire() failed: %08x
\n
"
,
hr
);
hr
=
IDirectInputEffect_Download
(
effect
);
ok
(
hr
==
DI_OK
,
"IDirectInputEffect_Download() failed: %08x
\n
"
,
hr
);
hr
=
IDirectInputEffect_GetEffectStatus
(
effect
,
&
effect_status
);
ok
(
hr
==
DI_OK
,
"IDirectInputEffect_GetEffectStatus() failed: %08x
\n
"
,
hr
);
ok
(
effect_status
==
0
,
"IDirectInputEffect_GetEffectStatus() reported effect as started
\n
"
);
hr
=
IDirectInputEffect_Start
(
effect
,
1
,
0
);
ok
(
hr
==
DI_OK
,
"IDirectInputEffect_Start() failed: %08x
\n
"
,
hr
);
hr
=
IDirectInputEffect_GetEffectStatus
(
effect
,
&
effect_status
);
ok
(
hr
==
DI_OK
,
"IDirectInputEffect_GetEffectStatus() failed: %08x
\n
"
,
hr
);
todo_wine
ok
(
effect_status
!=
0
,
"IDirectInputEffect_GetEffectStatus() reported effect as stopped
\n
"
);
ref
=
IUnknown_Release
(
effect
);
ok
(
ref
==
0
,
"IDirectInputDevice_Release() reference count = %d
\n
"
,
ref
);
}
...
...
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