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
44cd385a
Commit
44cd385a
authored
Aug 31, 2016
by
Bruno Jesus
Committed by
Alexandre Julliard
Sep 01, 2016
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
xinput1_3: Implement XInputGetState using XInputGetStateEx.
Signed-off-by:
Bruno Jesus
<
00cpxxx@gmail.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
0fe75804
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
17 additions
and
5 deletions
+17
-5
xinput1_3_main.c
dlls/xinput1_3/xinput1_3_main.c
+17
-5
No files found.
dlls/xinput1_3/xinput1_3_main.c
View file @
44cd385a
...
...
@@ -29,6 +29,9 @@
#include "xinput.h"
/* Not defined in the headers, used only by XInputGetStateEx */
#define XINPUT_GAMEPAD_GUIDE 0x0400
WINE_DEFAULT_DEBUG_CHANNEL
(
xinput
);
struct
...
...
@@ -72,17 +75,26 @@ DWORD WINAPI XInputSetState(DWORD index, XINPUT_VIBRATION* vibration)
DWORD
WINAPI
DECLSPEC_HOTPATCH
XInputGetState
(
DWORD
index
,
XINPUT_STATE
*
state
)
{
union
{
XINPUT_STATE
state
;
XINPUT_STATE_EX
state_ex
;
}
xinput
;
DWORD
ret
;
static
int
warn_once
;
if
(
!
warn_once
++
)
FIXME
(
"(index %u, state %p) Stub!
\n
"
,
index
,
state
);
if
(
index
>=
XUSER_MAX_COUNT
)
return
ERROR_BAD_ARGUMENTS
;
if
(
!
controllers
[
index
].
connected
)
return
ERROR_DEVICE_NOT_CONNECTED
;
ret
=
XInputGetStateEx
(
index
,
&
xinput
.
state_ex
);
if
(
ret
!=
ERROR_SUCCESS
)
return
ret
;
return
ERROR_NOT_SUPPORTED
;
/* The main difference between this and the Ex version is the media guide button */
xinput
.
state
.
Gamepad
.
wButtons
&=
~
XINPUT_GAMEPAD_GUIDE
;
*
state
=
xinput
.
state
;
return
ERROR_SUCCESS
;
}
DWORD
WINAPI
DECLSPEC_HOTPATCH
XInputGetStateEx
(
DWORD
index
,
XINPUT_STATE_EX
*
state_ex
)
...
...
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