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
3dce01a2
Commit
3dce01a2
authored
Apr 26, 2022
by
Rémi Bernon
Committed by
Alexandre Julliard
Jan 24, 2024
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
dinput/tests: Add some IRawGameController2 interface tests.
parent
dcfba0a2
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
35 additions
and
1 deletion
+35
-1
joystick8.c
dlls/dinput/tests/joystick8.c
+35
-1
No files found.
dlls/dinput/tests/joystick8.c
View file @
3dce01a2
...
...
@@ -4973,6 +4973,7 @@ static void test_windows_gaming_input(void)
static
const
WCHAR
*
racing_wheel_class_name
=
RuntimeClass_Windows_Gaming_Input_RacingWheel
;
static
const
WCHAR
*
gamepad_class_name
=
RuntimeClass_Windows_Gaming_Input_Gamepad
;
IVectorView_SimpleHapticsController
*
haptics_controllers
;
IRawGameController
*
raw_controller
,
*
tmp_raw_controller
;
IVectorView_RawGameController
*
controllers_view
;
IRawGameControllerStatics
*
controller_statics
;
...
...
@@ -4980,11 +4981,13 @@ static void test_windows_gaming_input(void)
IVectorView_RacingWheel
*
racing_wheels_view
;
IRacingWheelStatics2
*
racing_wheel_statics2
;
IRacingWheelStatics
*
racing_wheel_statics
;
IRawGameController2
*
raw_controller2
;
IVectorView_Gamepad
*
gamepads_view
;
IGamepadStatics
*
gamepad_statics
;
IGameController
*
game_controller
;
IRacingWheel
*
racing_wheel
;
UINT32
size
;
UINT32
size
,
length
;
const
WCHAR
*
buffer
;
HSTRING
str
;
HRESULT
hr
;
DWORD
res
;
...
...
@@ -5095,6 +5098,37 @@ static void test_windows_gaming_input(void)
IRawGameController_Release
(
tmp_raw_controller
);
IGameController_Release
(
game_controller
);
hr
=
IRawGameController_QueryInterface
(
raw_controller
,
&
IID_IRawGameController2
,
(
void
**
)
&
raw_controller2
);
todo_wine
ok
(
hr
==
S_OK
,
"QueryInterface returned %#lx
\n
"
,
hr
);
if
(
hr
!=
S_OK
)
goto
skip_tests
;
hr
=
IRawGameController2_get_DisplayName
(
raw_controller2
,
&
str
);
ok
(
hr
==
S_OK
,
"get_DisplayName returned %#lx
\n
"
,
hr
);
buffer
=
pWindowsGetStringRawBuffer
(
str
,
&
length
);
ok
(
!
wcscmp
(
buffer
,
L"HID-compliant game controller"
),
"get_DisplayName returned %s
\n
"
,
debugstr_wn
(
buffer
,
length
)
);
pWindowsDeleteString
(
str
);
hr
=
IRawGameController2_get_NonRoamableId
(
raw_controller2
,
&
str
);
ok
(
hr
==
S_OK
,
"get_NonRoamableId returned %#lx
\n
"
,
hr
);
buffer
=
pWindowsGetStringRawBuffer
(
str
,
&
length
);
ok
(
!
wcsncmp
(
buffer
,
L"{wgi/nrid/"
,
10
),
"get_NonRoamableId returned %s
\n
"
,
debugstr_wn
(
buffer
,
length
)
);
pWindowsDeleteString
(
str
);
/* FIXME: What kind of HID reports are needed to make this work? */
hr
=
IRawGameController2_get_SimpleHapticsControllers
(
raw_controller2
,
&
haptics_controllers
);
ok
(
hr
==
S_OK
,
"get_SimpleHapticsControllers returned %#lx
\n
"
,
hr
);
hr
=
IVectorView_SimpleHapticsController_get_Size
(
haptics_controllers
,
&
length
);
ok
(
hr
==
S_OK
,
"get_Size returned %#lx
\n
"
,
hr
);
ok
(
length
==
0
,
"got length %u
\n
"
,
length
);
IVectorView_SimpleHapticsController_Release
(
haptics_controllers
);
IRawGameController2_Release
(
raw_controller2
);
skip_tests:
IRawGameController_Release
(
raw_controller
);
hr
=
IRawGameControllerStatics_remove_RawGameControllerAdded
(
controller_statics
,
controller_added_token
);
...
...
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