ReactOS 0.4.15-dev-7953-g1f49173
xinput1_3_main.c File Reference
#include <config.h>
#include <wine/debug.h>
#include <winbase.h>
#include <xinput.h>
Include dependency graph for xinput1_3_main.c:

Go to the source code of this file.

Macros

#define XINPUT_GAMEPAD_GUIDE   0x0400
 

Functions

 WINE_DEFAULT_DEBUG_CHANNEL (xinput)
 
BOOL WINAPI DllMain (HINSTANCE inst, DWORD reason, LPVOID reserved)
 
void WINAPI DECLSPEC_HOTPATCH XInputEnable (BOOL enable)
 
DWORD WINAPI XInputSetState (DWORD index, XINPUT_VIBRATION *vibration)
 
DWORD WINAPI DECLSPEC_HOTPATCH XInputGetState (DWORD index, XINPUT_STATE *state)
 
DWORD WINAPI DECLSPEC_HOTPATCH XInputGetStateEx (DWORD index, XINPUT_STATE_EX *state_ex)
 
DWORD WINAPI XInputGetKeystroke (DWORD index, DWORD reserved, PXINPUT_KEYSTROKE keystroke)
 
DWORD WINAPI XInputGetCapabilities (DWORD index, DWORD flags, XINPUT_CAPABILITIES *capabilities)
 
DWORD WINAPI XInputGetDSoundAudioDeviceGuids (DWORD index, GUID *render_guid, GUID *capture_guid)
 
DWORD WINAPI XInputGetBatteryInformation (DWORD index, BYTE type, XINPUT_BATTERY_INFORMATION *battery)
 

Variables

struct {
   BOOL   connected
 
controllers [XUSER_MAX_COUNT]
 

Macro Definition Documentation

◆ XINPUT_GAMEPAD_GUIDE

#define XINPUT_GAMEPAD_GUIDE   0x0400

Definition at line 33 of file xinput1_3_main.c.

Function Documentation

◆ DllMain()

BOOL WINAPI DllMain ( HINSTANCE  inst,
DWORD  reason,
LPVOID  reserved 
)

Definition at line 42 of file xinput1_3_main.c.

43{
44 switch(reason)
45 {
48 break;
49 }
50 return TRUE;
51}
#define TRUE
Definition: types.h:120
static WCHAR reason[MAX_STRING_RESOURCE_LEN]
Definition: object.c:1904
#define DLL_PROCESS_ATTACH
Definition: compat.h:131
BOOL WINAPI DisableThreadLibraryCalls(IN HMODULE hLibModule)
Definition: loader.c:85

◆ WINE_DEFAULT_DEBUG_CHANNEL()

WINE_DEFAULT_DEBUG_CHANNEL ( xinput  )

◆ XInputEnable()

void WINAPI DECLSPEC_HOTPATCH XInputEnable ( BOOL  enable)

Definition at line 53 of file xinput1_3_main.c.

54{
55 /* Setting to false will stop messages from XInputSetState being sent
56 to the controllers. Setting to true will send the last vibration
57 value (sent to XInputSetState) to the controller and allow messages to
58 be sent */
59 FIXME("(enable %d) Stub!\n", enable);
60}
#define FIXME(fmt,...)
Definition: debug.h:111
GLboolean enable
Definition: glext.h:11120

◆ XInputGetBatteryInformation()

DWORD WINAPI XInputGetBatteryInformation ( DWORD  index,
BYTE  type,
XINPUT_BATTERY_INFORMATION battery 
)

Definition at line 155 of file xinput1_3_main.c.

156{
157 FIXME("(index %u, type %u, battery %p) Stub!\n", index, type, battery);
158
159 if (index >= XUSER_MAX_COUNT)
160 return ERROR_BAD_ARGUMENTS;
163
164 return ERROR_NOT_SUPPORTED;
165}
#define ERROR_NOT_SUPPORTED
Definition: compat.h:100
GLuint GLuint GLsizei GLenum type
Definition: gl.h:1545
GLuint index
Definition: glext.h:6031
#define ERROR_DEVICE_NOT_CONNECTED
Definition: winerror.h:689
#define ERROR_BAD_ARGUMENTS
Definition: winerror.h:232
struct @606 controllers[XUSER_MAX_COUNT]
BOOL connected
#define XUSER_MAX_COUNT
Definition: xinput.h:156

◆ XInputGetCapabilities()

DWORD WINAPI XInputGetCapabilities ( DWORD  index,
DWORD  flags,
XINPUT_CAPABILITIES capabilities 
)

Definition at line 128 of file xinput1_3_main.c.

129{
130 static int warn_once;
131
132 if (!warn_once++)
133 FIXME("(index %u, flags 0x%x, capabilities %p) Stub!\n", index, flags, capabilities);
134
135 if (index >= XUSER_MAX_COUNT)
136 return ERROR_BAD_ARGUMENTS;
139
140 return ERROR_NOT_SUPPORTED;
141}
GLbitfield flags
Definition: glext.h:7161

◆ XInputGetDSoundAudioDeviceGuids()

DWORD WINAPI XInputGetDSoundAudioDeviceGuids ( DWORD  index,
GUID render_guid,
GUID capture_guid 
)

Definition at line 143 of file xinput1_3_main.c.

144{
145 FIXME("(index %u, render guid %p, capture guid %p) Stub!\n", index, render_guid, capture_guid);
146
147 if (index >= XUSER_MAX_COUNT)
148 return ERROR_BAD_ARGUMENTS;
151
152 return ERROR_NOT_SUPPORTED;
153}

◆ XInputGetKeystroke()

DWORD WINAPI XInputGetKeystroke ( DWORD  index,
DWORD  reserved,
PXINPUT_KEYSTROKE  keystroke 
)

Definition at line 113 of file xinput1_3_main.c.

114{
115 static int warn_once;
116
117 if (!warn_once++)
118 FIXME("(index %u, reserved %u, keystroke %p) Stub!\n", index, reserved, keystroke);
119
120 if (index >= XUSER_MAX_COUNT)
121 return ERROR_BAD_ARGUMENTS;
124
125 return ERROR_NOT_SUPPORTED;
126}
r reserved
Definition: btrfs.c:3006

◆ XInputGetState()

DWORD WINAPI DECLSPEC_HOTPATCH XInputGetState ( DWORD  index,
XINPUT_STATE state 
)

Definition at line 74 of file xinput1_3_main.c.

75{
76 union
77 {
79 XINPUT_STATE_EX state_ex;
80 } xinput;
81 DWORD ret;
82 static int warn_once;
83
84 if (!warn_once++)
85 FIXME("(index %u, state %p) Stub!\n", index, state);
86
87 ret = XInputGetStateEx(index, &xinput.state_ex);
88 if (ret != ERROR_SUCCESS)
89 return ret;
90
91 /* The main difference between this and the Ex version is the media guide button */
92 xinput.state.Gamepad.wButtons &= ~XINPUT_GAMEPAD_GUIDE;
93 *state = xinput.state;
94
95 return ERROR_SUCCESS;
96}
static int state
Definition: maze.c:121
#define ERROR_SUCCESS
Definition: deptool.c:10
unsigned long DWORD
Definition: ntddk_ex.h:95
int ret
DWORD WINAPI DECLSPEC_HOTPATCH XInputGetStateEx(DWORD index, XINPUT_STATE_EX *state_ex)

◆ XInputGetStateEx()

DWORD WINAPI DECLSPEC_HOTPATCH XInputGetStateEx ( DWORD  index,
XINPUT_STATE_EX state_ex 
)

Definition at line 98 of file xinput1_3_main.c.

99{
100 static int warn_once;
101
102 if (!warn_once++)
103 FIXME("(index %u, state %p) Stub!\n", index, state_ex);
104
105 if (index >= XUSER_MAX_COUNT)
106 return ERROR_BAD_ARGUMENTS;
109
110 return ERROR_NOT_SUPPORTED;
111}

Referenced by XInputGetState().

◆ XInputSetState()

DWORD WINAPI XInputSetState ( DWORD  index,
XINPUT_VIBRATION vibration 
)

Definition at line 62 of file xinput1_3_main.c.

63{
64 FIXME("(index %u, vibration %p) Stub!\n", index, vibration);
65
70
72}

Variable Documentation

◆ connected

◆