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
ea30b88a
Commit
ea30b88a
authored
Apr 22, 2022
by
Rémi Bernon
Committed by
Alexandre Julliard
Apr 22, 2022
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
dinput/tests: Add some RacingWheel runtimeclass tests.
Signed-off-by:
Rémi Bernon
<
rbernon@codeweavers.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
b12c74e4
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
35 additions
and
1 deletion
+35
-1
force_feedback.c
dlls/dinput/tests/force_feedback.c
+35
-1
No files found.
dlls/dinput/tests/force_feedback.c
View file @
ea30b88a
...
...
@@ -5157,6 +5157,7 @@ static void test_windows_gaming_input(void)
};
static
const
WCHAR
*
force_feedback_motor
=
RuntimeClass_Windows_Gaming_Input_ForceFeedback_ForceFeedbackMotor
;
static
const
WCHAR
*
controller_class_name
=
RuntimeClass_Windows_Gaming_Input_RawGameController
;
static
const
WCHAR
*
racing_wheel_class_name
=
RuntimeClass_Windows_Gaming_Input_RacingWheel
;
DIPROPGUIDANDPATH
guid_path
=
{
...
...
@@ -5174,17 +5175,22 @@ static void test_windows_gaming_input(void)
EventRegistrationToken
controller_added_token
;
struct
bool_async_handler
bool_async_handler
;
IVectorView_ForceFeedbackMotor
*
motors_view
;
IVectorView_RacingWheel
*
racing_wheels_view
;
IRacingWheelStatics2
*
racing_wheel_statics2
;
IRacingWheelStatics
*
racing_wheel_statics
;
ForceFeedbackEffectAxes
supported_axes
;
IAsyncOperation_boolean
*
bool_async
;
IRawGameController
*
raw_controller
;
IGameController
*
game_controller
;
IDirectInputDevice8W
*
device
;
IForceFeedbackMotor
*
motor
;
IRacingWheel
*
racing_wheel
;
BOOLEAN
paused
,
enabled
;
IAsyncInfo
*
async_info
;
DOUBLE
gain
;
HSTRING
str
;
HANDLE
file
;
UINT32
size
;
DOUBLE
gain
;
HRESULT
hr
;
DWORD
ret
;
ULONG
ref
;
...
...
@@ -5248,6 +5254,34 @@ static void test_windows_gaming_input(void)
ok
(
hr
==
S_OK
,
"GetAt returned %#lx
\n
"
,
hr
);
IVectorView_RawGameController_Release
(
controllers_view
);
hr
=
pWindowsCreateString
(
racing_wheel_class_name
,
wcslen
(
racing_wheel_class_name
),
&
str
);
ok
(
hr
==
S_OK
,
"WindowsCreateString returned %#lx
\n
"
,
hr
);
hr
=
pRoGetActivationFactory
(
str
,
&
IID_IRacingWheelStatics
,
(
void
**
)
&
racing_wheel_statics
);
ok
(
hr
==
S_OK
,
"RoGetActivationFactory returned %#lx
\n
"
,
hr
);
hr
=
pRoGetActivationFactory
(
str
,
&
IID_IRacingWheelStatics2
,
(
void
**
)
&
racing_wheel_statics2
);
ok
(
hr
==
S_OK
,
"RoGetActivationFactory returned %#lx
\n
"
,
hr
);
pWindowsDeleteString
(
str
);
/* HID driving wheels aren't exposed as WGI gamepads on Windows */
hr
=
IRacingWheelStatics_get_RacingWheels
(
racing_wheel_statics
,
&
racing_wheels_view
);
ok
(
hr
==
S_OK
,
"get_RacingWheels returned %#lx
\n
"
,
hr
);
hr
=
IVectorView_RacingWheel_get_Size
(
racing_wheels_view
,
&
size
);
ok
(
hr
==
S_OK
,
"get_Size returned %#lx
\n
"
,
hr
);
todo_wine
/* but Wine currently intentionally does */
ok
(
size
==
0
,
"got size %u
\n
"
,
size
);
IVectorView_RacingWheel_Release
(
racing_wheels_view
);
IRacingWheelStatics_Release
(
racing_wheel_statics
);
hr
=
IRawGameController_QueryInterface
(
raw_controller
,
&
IID_IGameController
,
(
void
**
)
&
game_controller
);
ok
(
hr
==
S_OK
,
"QueryInterface returned %#lx
\n
"
,
hr
);
hr
=
IRacingWheelStatics2_FromGameController
(
racing_wheel_statics2
,
game_controller
,
&
racing_wheel
);
ok
(
hr
==
S_OK
,
"FromGameController returned %#lx
\n
"
,
hr
);
todo_wine
ok
(
racing_wheel
==
NULL
,
"got racing_wheel %p
\n
"
,
racing_wheel
);
IGameController_Release
(
game_controller
);
IRacingWheelStatics2_Release
(
racing_wheel_statics2
);
set_hid_expect
(
file
,
expect_acquire
,
sizeof
(
expect_acquire
)
);
hr
=
IRawGameController_get_ForceFeedbackMotors
(
raw_controller
,
&
motors_view
);
todo_wine
...
...
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