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
aea79184
Commit
aea79184
authored
Dec 10, 2023
by
Etaash Mathamsetty
Committed by
Alexandre Julliard
Jan 19, 2024
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
xinput: Implement XInputGetCapabilitiesEx.
parent
39304daf
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
42 additions
and
0 deletions
+42
-0
main.c
dlls/xinput1_3/main.c
+30
-0
xinput1_4.spec
dlls/xinput1_4/xinput1_4.spec
+1
-0
xinput.h
include/xinput.h
+11
-0
No files found.
dlls/xinput1_3/main.c
View file @
aea79184
...
@@ -1129,3 +1129,33 @@ DWORD WINAPI DECLSPEC_HOTPATCH XInputGetBatteryInformation(DWORD index, BYTE typ
...
@@ -1129,3 +1129,33 @@ DWORD WINAPI DECLSPEC_HOTPATCH XInputGetBatteryInformation(DWORD index, BYTE typ
return
ERROR_NOT_SUPPORTED
;
return
ERROR_NOT_SUPPORTED
;
}
}
DWORD
WINAPI
DECLSPEC_HOTPATCH
XInputGetCapabilitiesEx
(
DWORD
unk
,
DWORD
index
,
DWORD
flags
,
XINPUT_CAPABILITIES_EX
*
caps
)
{
HIDD_ATTRIBUTES
attr
;
DWORD
ret
=
ERROR_SUCCESS
;
TRACE
(
"unk %lu, index %lu, flags %#lx, capabilities %p.
\n
"
,
unk
,
index
,
flags
,
caps
);
start_update_thread
();
if
(
index
>=
XUSER_MAX_COUNT
)
return
ERROR_BAD_ARGUMENTS
;
if
(
!
controller_lock
(
&
controllers
[
index
]))
return
ERROR_DEVICE_NOT_CONNECTED
;
if
(
flags
&
XINPUT_FLAG_GAMEPAD
&&
controllers
[
index
].
caps
.
SubType
!=
XINPUT_DEVSUBTYPE_GAMEPAD
)
ret
=
ERROR_DEVICE_NOT_CONNECTED
;
else
if
(
!
HidD_GetAttributes
(
controllers
[
index
].
device
,
&
attr
))
ret
=
ERROR_DEVICE_NOT_CONNECTED
;
else
{
caps
->
Capabilities
=
controllers
[
index
].
caps
;
caps
->
VendorId
=
attr
.
VendorID
;
caps
->
ProductId
=
attr
.
ProductID
;
caps
->
VersionNumber
=
attr
.
VersionNumber
;
}
controller_unlock
(
&
controllers
[
index
]);
return
ret
;
}
dlls/xinput1_4/xinput1_4.spec
View file @
aea79184
...
@@ -7,3 +7,4 @@
...
@@ -7,3 +7,4 @@
8 stdcall XInputGetKeystroke(long long ptr)
8 stdcall XInputGetKeystroke(long long ptr)
10 stub XInputGetAudioDeviceIds(long ptr ptr ptr ptr)
10 stub XInputGetAudioDeviceIds(long ptr ptr ptr ptr)
100 stdcall XInputGetStateEx(long ptr)
100 stdcall XInputGetStateEx(long ptr)
108 stdcall XInputGetCapabilitiesEx(long long long ptr)
include/xinput.h
View file @
aea79184
...
@@ -210,6 +210,16 @@ typedef struct _XINPUT_CAPABILITIES {
...
@@ -210,6 +210,16 @@ typedef struct _XINPUT_CAPABILITIES {
XINPUT_VIBRATION
Vibration
;
XINPUT_VIBRATION
Vibration
;
}
XINPUT_CAPABILITIES
,
*
PXINPUT_CAPABILITIES
;
}
XINPUT_CAPABILITIES
,
*
PXINPUT_CAPABILITIES
;
typedef
struct
_XINPUT_CAPABILITIES_EX
{
XINPUT_CAPABILITIES
Capabilities
;
WORD
VendorId
;
WORD
ProductId
;
WORD
VersionNumber
;
WORD
unk1
;
DWORD
unk2
;
}
XINPUT_CAPABILITIES_EX
,
*
PXINPUT_CAPABILITIES_EX
;
/*
/*
* Defines the structure for a joystick input event which is
* Defines the structure for a joystick input event which is
* retrieved using the function XInputGetKeystroke
* retrieved using the function XInputGetKeystroke
...
@@ -237,6 +247,7 @@ DWORD WINAPI XInputSetState(DWORD, XINPUT_VIBRATION*);
...
@@ -237,6 +247,7 @@ DWORD WINAPI XInputSetState(DWORD, XINPUT_VIBRATION*);
DWORD
WINAPI
XInputGetState
(
DWORD
,
XINPUT_STATE
*
);
DWORD
WINAPI
XInputGetState
(
DWORD
,
XINPUT_STATE
*
);
DWORD
WINAPI
XInputGetKeystroke
(
DWORD
,
DWORD
,
PXINPUT_KEYSTROKE
);
DWORD
WINAPI
XInputGetKeystroke
(
DWORD
,
DWORD
,
PXINPUT_KEYSTROKE
);
DWORD
WINAPI
XInputGetCapabilities
(
DWORD
,
DWORD
,
XINPUT_CAPABILITIES
*
);
DWORD
WINAPI
XInputGetCapabilities
(
DWORD
,
DWORD
,
XINPUT_CAPABILITIES
*
);
DWORD
WINAPI
XInputGetCapabilitiesEx
(
DWORD
,
DWORD
,
DWORD
,
XINPUT_CAPABILITIES_EX
*
);
DWORD
WINAPI
XInputGetDSoundAudioDeviceGuids
(
DWORD
,
GUID
*
,
GUID
*
);
DWORD
WINAPI
XInputGetDSoundAudioDeviceGuids
(
DWORD
,
GUID
*
,
GUID
*
);
DWORD
WINAPI
XInputGetBatteryInformation
(
DWORD
,
BYTE
,
XINPUT_BATTERY_INFORMATION
*
);
DWORD
WINAPI
XInputGetBatteryInformation
(
DWORD
,
BYTE
,
XINPUT_BATTERY_INFORMATION
*
);
...
...
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