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
c0877844
Commit
c0877844
authored
May 22, 2023
by
Rémi Bernon
Committed by
Alexandre Julliard
May 23, 2023
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
windows.gaming.input: Query IGameController interface in TryGetFactoryControllerFromGameController.
parent
eab7b95b
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
10 additions
and
4 deletions
+10
-4
hotplug.c
dlls/dinput/tests/hotplug.c
+1
-1
joystick8.c
dlls/dinput/tests/joystick8.c
+1
-2
manager.c
dlls/windows.gaming.input/manager.c
+8
-1
No files found.
dlls/dinput/tests/hotplug.c
View file @
c0877844
...
@@ -1184,13 +1184,13 @@ static void test_windows_gaming_input(void)
...
@@ -1184,13 +1184,13 @@ static void test_windows_gaming_input(void)
IGameController_Release
(
tmp_game_controller
);
IGameController_Release
(
tmp_game_controller
);
next:
hr
=
IRawGameControllerStatics_FromGameController
(
statics
,
custom_controller
.
IGameController_outer
,
&
tmp_raw_controller
);
hr
=
IRawGameControllerStatics_FromGameController
(
statics
,
custom_controller
.
IGameController_outer
,
&
tmp_raw_controller
);
ok
(
hr
==
S_OK
,
"FromGameController returned %#lx
\n
"
,
hr
);
ok
(
hr
==
S_OK
,
"FromGameController returned %#lx
\n
"
,
hr
);
todo_wine
todo_wine
ok
(
tmp_raw_controller
==
raw_controller
,
"got controller %p
\n
"
,
tmp_raw_controller
);
ok
(
tmp_raw_controller
==
raw_controller
,
"got controller %p
\n
"
,
tmp_raw_controller
);
if
(
tmp_raw_controller
)
IRawGameController_Release
(
tmp_raw_controller
);
if
(
tmp_raw_controller
)
IRawGameController_Release
(
tmp_raw_controller
);
next:
IGameController_Release
(
game_controller
);
IGameController_Release
(
game_controller
);
IRawGameController_Release
(
raw_controller
);
IRawGameController_Release
(
raw_controller
);
SetEvent
(
stop_event
);
SetEvent
(
stop_event
);
...
...
dlls/dinput/tests/joystick8.c
View file @
c0877844
...
@@ -5092,9 +5092,8 @@ static void test_windows_gaming_input(void)
...
@@ -5092,9 +5092,8 @@ static void test_windows_gaming_input(void)
hr
=
IRawGameControllerStatics_FromGameController
(
controller_statics
,
(
IGameController
*
)
raw_controller
,
&
tmp_raw_controller
);
hr
=
IRawGameControllerStatics_FromGameController
(
controller_statics
,
(
IGameController
*
)
raw_controller
,
&
tmp_raw_controller
);
ok
(
hr
==
S_OK
,
"FromGameController returned %#lx
\n
"
,
hr
);
ok
(
hr
==
S_OK
,
"FromGameController returned %#lx
\n
"
,
hr
);
todo_wine
ok
(
tmp_raw_controller
==
raw_controller
,
"got unexpected IGameController interface
\n
"
);
ok
(
tmp_raw_controller
==
raw_controller
,
"got unexpected IGameController interface
\n
"
);
if
(
tmp_raw_controller
)
IRawGameController_Release
(
tmp_raw_controller
);
IRawGameController_Release
(
tmp_raw_controller
);
IGameController_Release
(
game_controller
);
IGameController_Release
(
game_controller
);
IRawGameController_Release
(
raw_controller
);
IRawGameController_Release
(
raw_controller
);
...
...
dlls/windows.gaming.input/manager.c
View file @
c0877844
...
@@ -372,14 +372,18 @@ statics2_TryGetFactoryControllerFromGameController( IGameControllerFactoryManage
...
@@ -372,14 +372,18 @@ statics2_TryGetFactoryControllerFromGameController( IGameControllerFactoryManage
IGameController
*
controller
,
IGameController
**
value
)
IGameController
*
controller
,
IGameController
**
value
)
{
{
struct
controller
*
entry
,
*
other
;
struct
controller
*
entry
,
*
other
;
IGameController
*
tmp_controller
;
BOOL
found
=
FALSE
;
BOOL
found
=
FALSE
;
TRACE
(
"iface %p, factory %p, controller %p, value %p.
\n
"
,
iface
,
factory
,
controller
,
value
);
TRACE
(
"iface %p, factory %p, controller %p, value %p.
\n
"
,
iface
,
factory
,
controller
,
value
);
/* Spider Man Remastered passes a IRawGameController instead of IGameController, query the iface again */
if
(
FAILED
(
IGameController_QueryInterface
(
controller
,
&
IID_IGameController
,
(
void
**
)
&
tmp_controller
)))
goto
done
;
EnterCriticalSection
(
&
manager_cs
);
EnterCriticalSection
(
&
manager_cs
);
LIST_FOR_EACH_ENTRY
(
entry
,
&
controller_list
,
struct
controller
,
entry
)
LIST_FOR_EACH_ENTRY
(
entry
,
&
controller_list
,
struct
controller
,
entry
)
if
((
found
=
&
entry
->
IGameController_iface
==
controller
))
break
;
if
((
found
=
&
entry
->
IGameController_iface
==
tmp_
controller
))
break
;
if
(
!
found
)
WARN
(
"Failed to find controller %p
\n
"
,
controller
);
if
(
!
found
)
WARN
(
"Failed to find controller %p
\n
"
,
controller
);
else
else
...
@@ -392,6 +396,9 @@ statics2_TryGetFactoryControllerFromGameController( IGameControllerFactoryManage
...
@@ -392,6 +396,9 @@ statics2_TryGetFactoryControllerFromGameController( IGameControllerFactoryManage
LeaveCriticalSection
(
&
manager_cs
);
LeaveCriticalSection
(
&
manager_cs
);
IGameController_Release
(
tmp_controller
);
done
:
if
(
!
found
)
*
value
=
NULL
;
if
(
!
found
)
*
value
=
NULL
;
return
S_OK
;
return
S_OK
;
}
}
...
...
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