<p>This structure is used by the <seecref="T:SharpDX.XInput.State"/> structure when polling for changes in the state of the controller.</p><p>The specific mapping of button to game function varies depending on the game type.</p><p>The constant XINPUT_GAMEPAD_TRIGGER_THRESHOLD may be used as the value which <strong>bLeftTrigger</strong> and <strong>bRightTrigger</strong> must be greater than to register as pressed. This is optional, but often desirable. Xbox 360 Controller buttons do not manifest crosstalk.</p>
<!-- No matching elements were found for the following include tag --><includefile=".\..\Documentation\CodeComments.xml"path="/comments/comment[@id='XINPUT_GAMEPAD']/*"/>
#define <seecref="F:SharpDX.XInput.GamepadButtonFlags.Y"/> 0x8000</pre><p>Bits that are set but not defined above are reserved, and their state is undefined.</p></dd>
<!-- No matching elements were found for the following include tag --><includefile=".\..\Documentation\CodeComments.xml"path="/comments/comment[@id='XINPUT_GAMEPAD::wButtons']/*"/>
<!-- No matching elements were found for the following include tag --><includefile=".\..\Documentation\CodeComments.xml"path="/comments/comment[@id='XINPUT_GAMEPAD::bLeftTrigger']/*"/>
<!-- No matching elements were found for the following include tag --><includefile=".\..\Documentation\CodeComments.xml"path="/comments/comment[@id='XINPUT_GAMEPAD::bRightTrigger']/*"/>
<dd> Left thumbstick x-axis value. Each of the thumbstick axis members is a signed value between -32768 and 32767 describing the position of the thumbstick. A value of 0 is centered. Negative values signify down or to the left. Positive values signify up or to the right. The constants <seecref="F:SharpDX.XInput.Gamepad.LeftThumbDeadZone"/> or <seecref="F:SharpDX.XInput.Gamepad.RightThumbDeadZone"/> can be used as a positive and negative value to filter a thumbstick input. </dd>
<!-- No matching elements were found for the following include tag --><includefile=".\..\Documentation\CodeComments.xml"path="/comments/comment[@id='XINPUT_GAMEPAD::sThumbLX']/*"/>
<!-- No matching elements were found for the following include tag --><includefile=".\..\Documentation\CodeComments.xml"path="/comments/comment[@id='XINPUT_GAMEPAD::sThumbLY']/*"/>
<!-- No matching elements were found for the following include tag --><includefile=".\..\Documentation\CodeComments.xml"path="/comments/comment[@id='XINPUT_GAMEPAD::sThumbRX']/*"/>
<!-- No matching elements were found for the following include tag --><includefile=".\..\Documentation\CodeComments.xml"path="/comments/comment[@id='XINPUT_GAMEPAD::sThumbRY']/*"/>
<!-- No matching elements were found for the following include tag --><includefile=".\..\Documentation\CodeComments.xml"path="/comments/comment[@id='BATTERY_DEVTYPE']/*"/>
<!-- No matching elements were found for the following include tag --><includefile=".\..\Documentation\CodeComments.xml"path="/comments/comment[@id='BATTERY_DEVTYPE_GAMEPAD']/*"/>
<!-- No matching elements were found for the following include tag --><includefile=".\..\Documentation\CodeComments.xml"path="/comments/comment[@id='BATTERY_DEVTYPE_HEADSET']/*"/>
<!-- No matching elements were found for the following include tag --><includefile=".\..\Documentation\CodeComments.xml"path="/comments/comment[@id='BATTERY_LEVEL']/*"/>
<!-- No matching elements were found for the following include tag --><includefile=".\..\Documentation\CodeComments.xml"path="/comments/comment[@id='BATTERY_LEVEL_EMPTY']/*"/>
<!-- No matching elements were found for the following include tag --><includefile=".\..\Documentation\CodeComments.xml"path="/comments/comment[@id='BATTERY_LEVEL_LOW']/*"/>
<!-- No matching elements were found for the following include tag --><includefile=".\..\Documentation\CodeComments.xml"path="/comments/comment[@id='BATTERY_LEVEL_MEDIUM']/*"/>
<!-- No matching elements were found for the following include tag --><includefile=".\..\Documentation\CodeComments.xml"path="/comments/comment[@id='BATTERY_LEVEL_FULL']/*"/>
<!-- No matching elements were found for the following include tag --><includefile=".\..\Documentation\CodeComments.xml"path="/comments/comment[@id='BATTERY_TYPE']/*"/>
<!-- No matching elements were found for the following include tag --><includefile=".\..\Documentation\CodeComments.xml"path="/comments/comment[@id='BATTERY_TYPE_DISCONNECTED']/*"/>
<!-- No matching elements were found for the following include tag --><includefile=".\..\Documentation\CodeComments.xml"path="/comments/comment[@id='BATTERY_TYPE_WIRED']/*"/>
<!-- No matching elements were found for the following include tag --><includefile=".\..\Documentation\CodeComments.xml"path="/comments/comment[@id='BATTERY_TYPE_ALKALINE']/*"/>
<!-- No matching elements were found for the following include tag --><includefile=".\..\Documentation\CodeComments.xml"path="/comments/comment[@id='BATTERY_TYPE_NIMH']/*"/>
<!-- No matching elements were found for the following include tag --><includefile=".\..\Documentation\CodeComments.xml"path="/comments/comment[@id='BATTERY_TYPE_UNKNOWN']/*"/>
<!-- No matching elements were found for the following include tag --><includefile=".\..\Documentation\CodeComments.xml"path="/comments/comment[@id='XINPUT_CAPS_FLAGS']/*"/>
<!-- No matching elements were found for the following include tag --><includefile=".\..\Documentation\CodeComments.xml"path="/comments/comment[@id='XINPUT_CAPS_VOICE_SUPPORTED']/*"/>
<!-- No matching elements were found for the following include tag --><includefile=".\..\Documentation\CodeComments.xml"path="/comments/comment[@id='']/*"/>
<!-- No matching elements were found for the following include tag --><includefile=".\..\Documentation\CodeComments.xml"path="/comments/comment[@id='XINPUT_DEVQUERYTYPE']/*"/>
<!-- No matching elements were found for the following include tag --><includefile=".\..\Documentation\CodeComments.xml"path="/comments/comment[@id='XINPUT_FLAG_GAMEPAD']/*"/>
<!-- No matching elements were found for the following include tag --><includefile=".\..\Documentation\CodeComments.xml"path="/comments/comment[@id='XINPUT_FLAG_ANY']/*"/>
<!-- No matching elements were found for the following include tag --><includefile=".\..\Documentation\CodeComments.xml"path="/comments/comment[@id='XINPUT_DEVSUBTYPE']/*"/>
<!-- No matching elements were found for the following include tag --><includefile=".\..\Documentation\CodeComments.xml"path="/comments/comment[@id='XINPUT_DEVSUBTYPE_GAMEPAD']/*"/>
<!-- No matching elements were found for the following include tag --><includefile=".\..\Documentation\CodeComments.xml"path="/comments/comment[@id='XINPUT_DEVSUBTYPE_WHEEL']/*"/>
<!-- No matching elements were found for the following include tag --><includefile=".\..\Documentation\CodeComments.xml"path="/comments/comment[@id='XINPUT_DEVSUBTYPE_ARCADE_STICK']/*"/>
<!-- No matching elements were found for the following include tag --><includefile=".\..\Documentation\CodeComments.xml"path="/comments/comment[@id='XINPUT_DEVSUBTYPE_FLIGHT_SICK']/*"/>
<!-- No matching elements were found for the following include tag --><includefile=".\..\Documentation\CodeComments.xml"path="/comments/comment[@id='XINPUT_DEVSUBTYPE_DANCE_PAD']/*"/>
<!-- No matching elements were found for the following include tag --><includefile=".\..\Documentation\CodeComments.xml"path="/comments/comment[@id='XINPUT_DEVSUBTYPE_GUITAR']/*"/>
<!-- No matching elements were found for the following include tag --><includefile=".\..\Documentation\CodeComments.xml"path="/comments/comment[@id='XINPUT_DEVSUBTYPE_DRUM_KIT']/*"/>
<!-- No matching elements were found for the following include tag --><includefile=".\..\Documentation\CodeComments.xml"path="/comments/comment[@id='XINPUT_DEVTYPE']/*"/>
<!-- No matching elements were found for the following include tag --><includefile=".\..\Documentation\CodeComments.xml"path="/comments/comment[@id='XINPUT_DEVTYPE_GAMEPAD']/*"/>
<!-- No matching elements were found for the following include tag --><includefile=".\..\Documentation\CodeComments.xml"path="/comments/comment[@id='XINPUT_GAMEPAD_BUTTON_FLAGS']/*"/>
<!-- No matching elements were found for the following include tag --><includefile=".\..\Documentation\CodeComments.xml"path="/comments/comment[@id='XINPUT_GAMEPAD_DPAD_UP']/*"/>
<!-- No matching elements were found for the following include tag --><includefile=".\..\Documentation\CodeComments.xml"path="/comments/comment[@id='XINPUT_GAMEPAD_DPAD_DOWN']/*"/>
<!-- No matching elements were found for the following include tag --><includefile=".\..\Documentation\CodeComments.xml"path="/comments/comment[@id='XINPUT_GAMEPAD_DPAD_LEFT']/*"/>
<!-- No matching elements were found for the following include tag --><includefile=".\..\Documentation\CodeComments.xml"path="/comments/comment[@id='XINPUT_GAMEPAD_DPAD_RIGHT']/*"/>
<!-- No matching elements were found for the following include tag --><includefile=".\..\Documentation\CodeComments.xml"path="/comments/comment[@id='XINPUT_GAMEPAD_START']/*"/>
<!-- No matching elements were found for the following include tag --><includefile=".\..\Documentation\CodeComments.xml"path="/comments/comment[@id='XINPUT_GAMEPAD_BACK']/*"/>
<!-- No matching elements were found for the following include tag --><includefile=".\..\Documentation\CodeComments.xml"path="/comments/comment[@id='XINPUT_GAMEPAD_LEFT_THUMB']/*"/>
<!-- No matching elements were found for the following include tag --><includefile=".\..\Documentation\CodeComments.xml"path="/comments/comment[@id='XINPUT_GAMEPAD_RIGHT_THUMB']/*"/>
<!-- No matching elements were found for the following include tag --><includefile=".\..\Documentation\CodeComments.xml"path="/comments/comment[@id='XINPUT_GAMEPAD_LEFT_SHOULDER']/*"/>
<!-- No matching elements were found for the following include tag --><includefile=".\..\Documentation\CodeComments.xml"path="/comments/comment[@id='XINPUT_GAMEPAD_RIGHT_SHOULDER']/*"/>
<!-- No matching elements were found for the following include tag --><includefile=".\..\Documentation\CodeComments.xml"path="/comments/comment[@id='XINPUT_GAMEPAD_A']/*"/>
<!-- No matching elements were found for the following include tag --><includefile=".\..\Documentation\CodeComments.xml"path="/comments/comment[@id='XINPUT_GAMEPAD_B']/*"/>
<!-- No matching elements were found for the following include tag --><includefile=".\..\Documentation\CodeComments.xml"path="/comments/comment[@id='XINPUT_GAMEPAD_X']/*"/>
<!-- No matching elements were found for the following include tag --><includefile=".\..\Documentation\CodeComments.xml"path="/comments/comment[@id='XINPUT_GAMEPAD_Y']/*"/>
<!-- No matching elements were found for the following include tag --><includefile=".\..\Documentation\CodeComments.xml"path="/comments/comment[@id='']/*"/>
<!-- No matching elements were found for the following include tag --><includefile=".\..\Documentation\CodeComments.xml"path="/comments/comment[@id='XINPUT_GAMEPAD_KEY_CODE']/*"/>
<!-- No matching elements were found for the following include tag --><includefile=".\..\Documentation\CodeComments.xml"path="/comments/comment[@id='VK_PAD_A']/*"/>
<!-- No matching elements were found for the following include tag --><includefile=".\..\Documentation\CodeComments.xml"path="/comments/comment[@id='VK_PAD_B']/*"/>
<!-- No matching elements were found for the following include tag --><includefile=".\..\Documentation\CodeComments.xml"path="/comments/comment[@id='VK_PAD_X']/*"/>
<!-- No matching elements were found for the following include tag --><includefile=".\..\Documentation\CodeComments.xml"path="/comments/comment[@id='VK_PAD_Y']/*"/>
<!-- No matching elements were found for the following include tag --><includefile=".\..\Documentation\CodeComments.xml"path="/comments/comment[@id='VK_PAD_RSHOULDER']/*"/>
<!-- No matching elements were found for the following include tag --><includefile=".\..\Documentation\CodeComments.xml"path="/comments/comment[@id='VK_PAD_LSHOULDER']/*"/>
<!-- No matching elements were found for the following include tag --><includefile=".\..\Documentation\CodeComments.xml"path="/comments/comment[@id='VK_PAD_LTRIGGER']/*"/>
<!-- No matching elements were found for the following include tag --><includefile=".\..\Documentation\CodeComments.xml"path="/comments/comment[@id='VK_PAD_RTRIGGER']/*"/>
<!-- No matching elements were found for the following include tag --><includefile=".\..\Documentation\CodeComments.xml"path="/comments/comment[@id='VK_PAD_DPAD_UP']/*"/>
<!-- No matching elements were found for the following include tag --><includefile=".\..\Documentation\CodeComments.xml"path="/comments/comment[@id='VK_PAD_DPAD_DOWN']/*"/>
<!-- No matching elements were found for the following include tag --><includefile=".\..\Documentation\CodeComments.xml"path="/comments/comment[@id='VK_PAD_DPAD_LEFT']/*"/>
<!-- No matching elements were found for the following include tag --><includefile=".\..\Documentation\CodeComments.xml"path="/comments/comment[@id='VK_PAD_DPAD_RIGHT']/*"/>
<!-- No matching elements were found for the following include tag --><includefile=".\..\Documentation\CodeComments.xml"path="/comments/comment[@id='VK_PAD_START']/*"/>
<!-- No matching elements were found for the following include tag --><includefile=".\..\Documentation\CodeComments.xml"path="/comments/comment[@id='VK_PAD_BACK']/*"/>
<!-- No matching elements were found for the following include tag --><includefile=".\..\Documentation\CodeComments.xml"path="/comments/comment[@id='VK_PAD_LTHUMB_PRESS']/*"/>
<!-- No matching elements were found for the following include tag --><includefile=".\..\Documentation\CodeComments.xml"path="/comments/comment[@id='VK_PAD_RTHUMB_PRESS']/*"/>
<!-- No matching elements were found for the following include tag --><includefile=".\..\Documentation\CodeComments.xml"path="/comments/comment[@id='VK_PAD_LTHUMB_UP']/*"/>
<!-- No matching elements were found for the following include tag --><includefile=".\..\Documentation\CodeComments.xml"path="/comments/comment[@id='VK_PAD_LTHUMB_DOWN']/*"/>
<!-- No matching elements were found for the following include tag --><includefile=".\..\Documentation\CodeComments.xml"path="/comments/comment[@id='VK_PAD_LTHUMB_RIGHT']/*"/>
<!-- No matching elements were found for the following include tag --><includefile=".\..\Documentation\CodeComments.xml"path="/comments/comment[@id='VK_PAD_LTHUMB_LEFT']/*"/>
<!-- No matching elements were found for the following include tag --><includefile=".\..\Documentation\CodeComments.xml"path="/comments/comment[@id='VK_PAD_LTHUMB_UPLEFT']/*"/>
<!-- No matching elements were found for the following include tag --><includefile=".\..\Documentation\CodeComments.xml"path="/comments/comment[@id='VK_PAD_LTHUMB_UPRIGHT']/*"/>
<!-- No matching elements were found for the following include tag --><includefile=".\..\Documentation\CodeComments.xml"path="/comments/comment[@id='VK_PAD_LTHUMB_DOWNRIGHT']/*"/>
<!-- No matching elements were found for the following include tag --><includefile=".\..\Documentation\CodeComments.xml"path="/comments/comment[@id='VK_PAD_LTHUMB_DOWNLEFT']/*"/>
<!-- No matching elements were found for the following include tag --><includefile=".\..\Documentation\CodeComments.xml"path="/comments/comment[@id='VK_PAD_RTHUMB_UP']/*"/>
<!-- No matching elements were found for the following include tag --><includefile=".\..\Documentation\CodeComments.xml"path="/comments/comment[@id='VK_PAD_RTHUMB_DOWN']/*"/>
<!-- No matching elements were found for the following include tag --><includefile=".\..\Documentation\CodeComments.xml"path="/comments/comment[@id='VK_PAD_RTHUMB_RIGHT']/*"/>
<!-- No matching elements were found for the following include tag --><includefile=".\..\Documentation\CodeComments.xml"path="/comments/comment[@id='VK_PAD_RTHUMB_LEFT']/*"/>
<!-- No matching elements were found for the following include tag --><includefile=".\..\Documentation\CodeComments.xml"path="/comments/comment[@id='VK_PAD_RTHUMB_UPLEFT']/*"/>
<!-- No matching elements were found for the following include tag --><includefile=".\..\Documentation\CodeComments.xml"path="/comments/comment[@id='VK_PAD_RTHUMB_UPRIGHT']/*"/>
<!-- No matching elements were found for the following include tag --><includefile=".\..\Documentation\CodeComments.xml"path="/comments/comment[@id='VK_PAD_RTHUMB_DOWNRIGHT']/*"/>
<!-- No matching elements were found for the following include tag --><includefile=".\..\Documentation\CodeComments.xml"path="/comments/comment[@id='VK_PAD_RTHUMB_DOWNLEFT']/*"/>
<!-- No matching elements were found for the following include tag --><includefile=".\..\Documentation\CodeComments.xml"path="/comments/comment[@id='']/*"/>
<!-- No matching elements were found for the following include tag --><includefile=".\..\Documentation\CodeComments.xml"path="/comments/comment[@id='XINPUT_KEYSTROKE_FLAGS']/*"/>
<!-- No matching elements were found for the following include tag --><includefile=".\..\Documentation\CodeComments.xml"path="/comments/comment[@id='XINPUT_KEYSTROKE_KEYDOWN']/*"/>
<!-- No matching elements were found for the following include tag --><includefile=".\..\Documentation\CodeComments.xml"path="/comments/comment[@id='XINPUT_KEYSTROKE_KEYUP']/*"/>
<!-- No matching elements were found for the following include tag --><includefile=".\..\Documentation\CodeComments.xml"path="/comments/comment[@id='XINPUT_KEYSTROKE_REPEAT']/*"/>
<!-- No matching elements were found for the following include tag --><includefile=".\..\Documentation\CodeComments.xml"path="/comments/comment[@id='']/*"/>
<!-- No matching elements were found for the following include tag --><includefile=".\..\Documentation\CodeComments.xml"path="/comments/comment[@id='XUSER_INDEX']/*"/>
<!-- No matching elements were found for the following include tag --><includefile=".\..\Documentation\CodeComments.xml"path="/comments/comment[@id='XUSER_INDEX_ANY']/*"/>
<!-- No matching elements were found for the following include tag --><includefile=".\..\Documentation\CodeComments.xml"path="/comments/comment[@id='XUSER_INDEX_ONE']/*"/>
<!-- No matching elements were found for the following include tag --><includefile=".\..\Documentation\CodeComments.xml"path="/comments/comment[@id='XUSER_INDEX_TWO']/*"/>
<!-- No matching elements were found for the following include tag --><includefile=".\..\Documentation\CodeComments.xml"path="/comments/comment[@id='XUSER_INDEX_THREE']/*"/>
<!-- No matching elements were found for the following include tag --><includefile=".\..\Documentation\CodeComments.xml"path="/comments/comment[@id='XUSER_INDEX_FOUR']/*"/>
<!-- No matching elements were found for the following include tag --><includefile=".\..\Documentation\CodeComments.xml"path="/comments/comment[@id='SharpDX.XInput.XInput']/*"/>
<paramname="dwUserIndex"><dd>[in] Index of the signed-in gamer associated with the device. Can be a value in the range 0?XUSER_MAX_COUNT???1, or <seecref="F:SharpDX.XInput.UserIndex.Any"/> to fetch the next available input event from any user. </dd></param>
<paramname="dwReserved"><dd>[in] Input flags that identify the device type. <table><tr><th>Value</th><th>Description</th></tr><tr><td><seecref="F:SharpDX.XInput.DeviceQueryType.Gamepad"/></td><td>Limit input event fetch to the gamepad.?</td></tr></table></dd></param>
<paramname="keystrokeRef"><dd>[out] Pointer to an <seecref="T:SharpDX.XInput.Keystroke"/> structure that receives an input event. </dd></param>
<returns><p>If the function succeeds, the return value is <seecref="F:SharpDX.Win32.ErrorCode.Success"/>.</p><p>If no new keys have been pressed, the return value is <seecref="F:SharpDX.Win32.ErrorCode.Empty"/>.</p><p>If the controller is not connected or the user has not activated it, the return value is <seecref="F:SharpDX.Win32.ErrorCode.DeviceNotConnected"/>. (See Remarks.)</p><p>If the function fails, the return value is an error code defined in Winerror.h. The function does not use SetLastError to set the calling thread's last-error code.</p></returns>
<remarks>
<p>Wireless controllers are not considered active upon system startup, and calls to any of the <strong>XInput</strong> functions before a wireless controller is made active return <seecref="F:SharpDX.Win32.ErrorCode.DeviceNotConnected"/>. Game titles must examine the return code and be prepared to handle this condition. Wired controllers are automatically activated when they are inserted. Wireless controllers are activated when the user presses the START or Xbox Guide button to power on the controller.</p>
<!-- No matching elements were found for the following include tag --><includefile=".\..\Documentation\CodeComments.xml"path="/comments/comment[@id='XInputGetKeystroke']/*"/>
Sends data to a connected controller. This function is used to activate the vibration function of a controller.
</summary>
<paramname="dwUserIndex"><dd>[in] Index of the user's controller. Can be a value from 0 to 3. For information about how this value is determined and how the value maps to indicators on the controller, see Multiple Controllers. </dd></param>
<paramname="vibrationRef"><dd>[in, out] Pointer to an <seecref="T:SharpDX.XInput.Vibration"/> structure containing the vibration information to send to the controller. </dd></param>
<returns><p>If the function succeeds, the return value is <seecref="F:SharpDX.Win32.ErrorCode.Success"/>.</p><p>If the controller is not connected, the return value is <seecref="F:SharpDX.Win32.ErrorCode.DeviceNotConnected"/>.</p><p>If the function fails, the return value is an error code defined in Winerror.h. The function does not use <strong>SetLastError</strong> to set the calling thread's last-error code.</p></returns>
<!-- No matching elements were found for the following include tag --><includefile=".\..\Documentation\CodeComments.xml"path="/comments/comment[@id='XInputSetState']/*"/>
Gets the sound rendering and sound capture device GUIDs that are associated with the headset connected to the specified controller.
</summary>
<paramname="dwUserIndex"><dd>[in] Index of the user's controller. It can be a value in the range 0?3. For information about how this value is determined and how the value maps to indicators on the controller, see Multiple Controllers. </dd></param>
<paramname="dSoundRenderGuidRef"><dd>[out, optional] Pointer that receives the <seecref="T:System.Guid"/> of the headset sound rendering device. </dd></param>
<paramname="dSoundCaptureGuidRef"><dd>[out, optional] Pointer that receives the <seecref="T:System.Guid"/> of the headset sound capture device. </dd></param>
<returns><p>If the function successfully retrieves the device IDs for render and capture, the return code is <seecref="F:SharpDX.Win32.ErrorCode.Success"/>.</p><p>If there is no headset connected to the controller, the function also retrieves <seecref="F:SharpDX.Win32.ErrorCode.Success"/> with GUID_NULL as the values for <strong>pDSoundRenderGuid</strong> and <strong>pDSoundCaptureGuid</strong>.</p><p>If the controller port device is not physically connected, the function returns <seecref="F:SharpDX.Win32.ErrorCode.DeviceNotConnected"/>.</p><p>If the function fails, it returns a valid Win32 error code.</p></returns>
<remarks>
<p>Use of legacy DirectSound is not recommended, and DirectSound is not available for Modern applications.</p>
<!-- No matching elements were found for the following include tag --><includefile=".\..\Documentation\CodeComments.xml"path="/comments/comment[@id='XInputGetDSoundAudioDeviceGuids']/*"/>
<unmanaged>unsigned int XInputGetDSoundAudioDeviceGuids([In] unsigned int dwUserIndex,[Out] GUID* pDSoundRenderGuid,[Out] GUID* pDSoundCaptureGuid)</unmanaged>
Retrieves the current state of the specified controller.
</summary>
<paramname="dwUserIndex"><dd>[in] Index of the user's controller. Can be a value from 0 to 3. For information about how this value is determined and how the value maps to indicators on the controller, see Multiple Controllers. </dd></param>
<paramname="stateRef"><dd>[out] Pointer to an <seecref="T:SharpDX.XInput.State"/> structure that receives the current state of the controller. </dd></param>
<returns><p>If the function succeeds, the return value is <seecref="F:SharpDX.Win32.ErrorCode.Success"/>.</p><p>If the controller is not connected, the return value is <seecref="F:SharpDX.Win32.ErrorCode.DeviceNotConnected"/>.</p><p>If the function fails, the return value is an error code defined in Winerror.h. The function does not use <strong>SetLastError</strong> to set the calling thread's last-error code.</p></returns>
<remarks>
<p>When <strong><seecref="M:SharpDX.XInput.XInput.XInputGetState(System.Int32,SharpDX.XInput.State@)"/></strong> is used to retrieve controller data, the left and right triggers are each reported separately. For legacy reasons, when DirectInput retrieves controller data, the two triggers share the same axis. The legacy behavior is noticeable in the current Game Device Control Panel, which uses DirectInput for controller state.</p>
<!-- No matching elements were found for the following include tag --><includefile=".\..\Documentation\CodeComments.xml"path="/comments/comment[@id='XInputGetState']/*"/>
Retrieves the capabilities and features of a connected controller.
</summary>
<paramname="dwUserIndex"><dd>[in] Index of the user's controller. Can be a value in the range 0?3. For information about how this value is determined and how the value maps to indicators on the controller, see Multiple Controllers. </dd></param>
<paramname="dwFlags"><dd>[in] Input flags that identify the controller type. If this value is 0, then the capabilities of all controllers connected to the system are returned. Currently, only one value is supported: <table><tr><th>Value</th><th>Description</th></tr><tr><td><seecref="F:SharpDX.XInput.DeviceQueryType.Gamepad"/></td><td>Limit query to devices of Xbox 360 Controller type.?</td></tr></table><p>Any value of <em>dwflags</em> other than the above or 0 is illegal and will result in an error break when debugging.</p></dd></param>
<paramname="capabilitiesRef"><dd>[out] Pointer to an <seecref="T:SharpDX.XInput.Capabilities"/> structure that receives the controller capabilities. </dd></param>
<returns><p>If the function succeeds, the return value is <seecref="F:SharpDX.Win32.ErrorCode.Success"/>.</p><p>If the controller is not connected, the return value is <seecref="F:SharpDX.Win32.ErrorCode.DeviceNotConnected"/>.</p><p>If the function fails, the return value is an error code defined in Winerror.h. The function does not use <strong>SetLastError</strong> to set the calling thread's last-error code.</p></returns>
<!-- No matching elements were found for the following include tag --><includefile=".\..\Documentation\CodeComments.xml"path="/comments/comment[@id='XInputGetCapabilities']/*"/>
<unmanaged>unsigned int XInputGetCapabilities([In] unsigned int dwUserIndex,[In] XINPUT_DEVQUERYTYPE dwFlags,[Out] XINPUT_CAPABILITIES* pCapabilities)</unmanaged>
Retrieves the battery type and charge status of a wireless controller.
</summary>
<paramname="dwUserIndex"><dd>[in] Index of the signed-in gamer associated with the device. Can be a value in the range 0?XUSER_MAX_COUNT???1. </dd></param>
<paramname="devType"><dd>[in] Specifies which device associated with this user index should be queried. Must be <seecref="F:SharpDX.XInput.BatteryDeviceType.Gamepad"/> or <seecref="F:SharpDX.XInput.BatteryDeviceType.Headset"/>. </dd></param>
<paramname="batteryInformationRef"><dd>[out] Pointer to an <seecref="T:SharpDX.XInput.BatteryInformation"/> structure that receives the battery information. </dd></param>
<returns><p>If the function succeeds, the return value is <seecref="F:SharpDX.Win32.ErrorCode.Success"/>.</p></returns>
<!-- No matching elements were found for the following include tag --><includefile=".\..\Documentation\CodeComments.xml"path="/comments/comment[@id='XInputGetBatteryInformation']/*"/>
<unmanaged>unsigned int XInputGetBatteryInformation([In] unsigned int dwUserIndex,[In] BATTERY_DEVTYPE devType,[Out] XINPUT_BATTERY_INFORMATION* pBatteryInformation)</unmanaged>
<paramname="enable"><dd> If <em>enable</em> is <strong><seecref="F:SharpDX.Result.False"/></strong>, XInput will only send neutral data in response to <seecref="M:SharpDX.XInput.XInput.XInputGetState(System.Int32,SharpDX.XInput.State@)"/> (all buttons up, axes centered, and triggers at 0). <seecref="M:SharpDX.XInput.XInput.XInputSetState(System.Int32,SharpDX.XInput.Vibration)"/> calls will be registered but not sent to the device. Sending any value other than <strong><seecref="F:SharpDX.Result.False"/></strong> will restore reading and writing functionality to normal. </dd></param>
<remarks>
<p>This function is meant to be called when an application gains or loses focus (such as via WM_ACTIVATEAPP). Using this function, you will not have to change the XInput query loop in your application as neutral data will always be reported if XInput is disabled.</p><p>In a controller that supports vibration effects:</p><ul><li><p>Passing <strong><seecref="F:SharpDX.Result.False"/></strong> will stop any vibration effects currently playing. In this state, calls to <seecref="M:SharpDX.XInput.XInput.XInputSetState(System.Int32,SharpDX.XInput.Vibration)"/> will be registered, but not passed to the device.</p></li><li><p>Passing <strong>TRUE</strong> will pass the last vibration request (even if it is 0) sent to <seecref="M:SharpDX.XInput.XInput.XInputSetState(System.Int32,SharpDX.XInput.Vibration)"/> to the device.</p></li></ul>
</remarks>
<!-- No matching elements were found for the following include tag --><includefile=".\..\Documentation\CodeComments.xml"path="/comments/comment[@id='XInputEnable']/*"/>
<!-- No matching elements were found for the following include tag --><includefile=".\..\Documentation\CodeComments.xml"path="/comments/comment[@id='XINPUT_BATTERY_INFORMATION']/*"/>
<dd> The type of battery. <em>BatteryType</em> will be one of the following values. <table><tr><th>Value</th><th>Description</th></tr><tr><td><seecref="F:SharpDX.XInput.BatteryType.Disconnected"/></td><td>The device is not connected.?</td></tr><tr><td><seecref="F:SharpDX.XInput.BatteryType.Wired"/></td><td>The device is a wired device and does not have a battery.?</td></tr><tr><td><seecref="F:SharpDX.XInput.BatteryType.Alkaline"/></td><td>The device has an alkaline battery.?</td></tr><tr><td><seecref="F:SharpDX.XInput.BatteryType.Nimh"/></td><td>The device has a nickel metal hydride battery.?</td></tr><tr><td><seecref="F:SharpDX.XInput.BatteryType.Unknown"/></td><td>The device has an unknown battery type.?</td></tr></table></dd>
<!-- No matching elements were found for the following include tag --><includefile=".\..\Documentation\CodeComments.xml"path="/comments/comment[@id='XINPUT_BATTERY_INFORMATION::BatteryType']/*"/>
<dd> The charge state of the battery. This value is only valid for wireless devices with a known battery type. <em>BatteryLevel</em> will be one of the following values. <table><tr><th>Value</th></tr><tr><td><seecref="F:SharpDX.XInput.BatteryLevel.Empty"/></td></tr><tr><td><seecref="F:SharpDX.XInput.BatteryLevel.Low"/></td></tr><tr><td><seecref="F:SharpDX.XInput.BatteryLevel.Medium"/></td></tr><tr><td><seecref="F:SharpDX.XInput.BatteryLevel.Full"/></td></tr></table></dd>
<!-- No matching elements were found for the following include tag --><includefile=".\..\Documentation\CodeComments.xml"path="/comments/comment[@id='XINPUT_BATTERY_INFORMATION::BatteryLevel']/*"/>
<p><seecref="M:SharpDX.XInput.XInput.XInputGetCapabilities(System.Int32,SharpDX.XInput.DeviceQueryType,SharpDX.XInput.Capabilities@)"/> returns <seecref="T:SharpDX.XInput.Capabilities"/> to indicate the characteristics and available functionality of a specified controller.</p><p><seecref="M:SharpDX.XInput.XInput.XInputGetCapabilities(System.Int32,SharpDX.XInput.DeviceQueryType,SharpDX.XInput.Capabilities@)"/> sets the structure members to indicate which inputs the device supports. For binary state controls, such as digital buttons, the corresponding bit reflects whether or not the control is supported by the device. For proportional controls, such as thumbsticks, the value indicates the resolution for that control. Some number of the least significant bits may not be set, indicating that the control does not provide resolution to that level.</p><p>The <strong>SubType</strong> member indicates the specific subtype of controller present. Games may detect the controller subtype and tune their handling of controller input or output based on subtypes that are well suited to their game genre. For example, a car racing game might check for the presence of a wheel controller to provide finer control of the car being driven. However, titles must not disable or ignore a device based on its subtype. Subtypes not recognized by the game or for which the game is not specifically tuned should be treated as a standard Xbox 360 Controller (<seecref="F:SharpDX.XInput.DeviceSubType.Gamepad"/>).</p><p>Older XUSB Windows drivers report incomplete capabilities information, particularly for wireless devices. The latest XUSB Windows driver provides full support for wired and wireless devices, and more complete and accurate capabilties flags.</p>
<!-- No matching elements were found for the following include tag --><includefile=".\..\Documentation\CodeComments.xml"path="/comments/comment[@id='XINPUT_CAPABILITIES']/*"/>
<!-- No matching elements were found for the following include tag --><includefile=".\..\Documentation\CodeComments.xml"path="/comments/comment[@id='XINPUT_CAPABILITIES::Type']/*"/>
<!-- No matching elements were found for the following include tag --><includefile=".\..\Documentation\CodeComments.xml"path="/comments/comment[@id='XINPUT_CAPABILITIES::SubType']/*"/>
<!-- No matching elements were found for the following include tag --><includefile=".\..\Documentation\CodeComments.xml"path="/comments/comment[@id='XINPUT_CAPABILITIES::Flags']/*"/>
<!-- No matching elements were found for the following include tag --><includefile=".\..\Documentation\CodeComments.xml"path="/comments/comment[@id='XINPUT_CAPABILITIES::Gamepad']/*"/>
<!-- No matching elements were found for the following include tag --><includefile=".\..\Documentation\CodeComments.xml"path="/comments/comment[@id='XINPUT_CAPABILITIES::Vibration']/*"/>
<p>Future devices may return HID codes and virtual key values that are not supported on current devices, and are currently undefined. Applications should ignore these unexpected values.</p><p>A <em>virtual-key code</em> is a byte value that represents a particular physical key on the keyboard, not the character or characters (possibly none) that the key can be mapped to based on keyboard state. The keyboard state at the time a virtual key is pressed modifies the character reported. For example, VK_4 might represent a "4" or a "$", depending on the state of the SHIFT key.</p><p>A reported keyboard event includes the virtual key that caused the event, whether the key was pressed or released (or is repeating), and the state of the keyboard at the time of the event. The keyboard state includes information about whether any CTRL, ALT, or SHIFT keys are down.</p><p>If the keyboard event represents an Unicode character (for example, pressing the "A" key), the <strong>Unicode</strong> member will contain that character. Otherwise, <strong>Unicode</strong> will contain the value zero.</p><p>The valid virtual-key (VK_<em>xxx</em>) codes are defined in XInput.h. In addition to codes that indicate key presses, the following codes indicate controller input.</p><table><tr><th>Value</th><th>Description</th></tr><tr><td><seecref="F:SharpDX.XInput.GamepadKeyCode.A"/></td><td><strong>A</strong> button?</td></tr><tr><td><seecref="F:SharpDX.XInput.GamepadKeyCode.B"/></td><td><strong>B</strong> button?</td></tr><tr><td><seecref="F:SharpDX.XInput.GamepadKeyCode.X"/></td><td><strong>X</strong> button?</td></tr><tr><td><seecref="F:SharpDX.XInput.GamepadKeyCode.Y"/></td><td><strong>Y</strong> button?</td></tr><tr><td><seecref="F:SharpDX.XInput.GamepadKeyCode.RightShoulder"/></td><td>Right shoulder button?</td></tr><tr><td><seecref="F:SharpDX.XInput.GamepadKeyCode.LeftShoulder"/></td><td>Left shoulder button?</td></tr><tr><td><seecref="F:SharpDX.XInput.GamepadKeyCode.LeftTrigger"/></td><td>Left trigger?</td></tr><tr><td><seecref="F:SharpDX.XInput.GamepadKeyCode.RightTrigger"/></td><td>Right trigger?</td></tr><tr><td><seecref="F:SharpDX.XInput.GamepadKeyCode.DPadUp"/></td><td>Directional pad up?</td></tr><tr><td><seecref="F:SharpDX.XInput.GamepadKeyCode.DPadDown"/></td><td>Directional pad down?</td></tr><tr><td><seecref="F:SharpDX.XInput.GamepadKeyCode.DPadLeft"/></td><td>Directional pad left?</td></tr><tr><td><seecref="F:SharpDX.XInput.GamepadKeyCode.DPadRight"/></td><td>Directional pad right?</td></tr><tr><td><seecref="F:SharpDX.XInput.GamepadKeyCode.Start"/></td><td><strong>START</strong> button?</td></tr><tr><td><seecref="F:SharpDX.XInput.GamepadKeyCode.Back"/></td><td><strong>BACK</strong> button?</td></tr><tr><td><seecref="F:SharpDX.XInput.GamepadKeyCode.LeftThumbPress"/></td><td>Left thumbstick click?</td></tr><tr><td><seecref="F:SharpDX.XInput.GamepadKeyCode.RightThumbPress"/></td><td>Right thumbstick click?</td></tr><tr><td><seecref="F:SharpDX.XInput.GamepadKeyCode.LeftThumbUp"/></td><td>Left thumbstick up?</td></tr><tr><td><seecref="F:SharpDX.XInput.GamepadKeyCode.LeftThumbDown"/></td><td>Left thumbstick down?</td></tr><tr><td><seecref="F:SharpDX.XInput.GamepadKeyCode.LeftThumbRight"/></td><td>Left thumbstick right?</td></tr><tr><td><seecref="F:SharpDX.XInput.GamepadKeyCode.LeftThumbLeft"/></td><td>Left thumbstick left?</td></tr><tr><td><seecref="F:SharpDX.XInput.GamepadKeyCode.RightThumbUpLeft"/></td><td>Left thumbstick up and left?</td></tr><tr><td><seecref="F:SharpDX.XInput.GamepadKeyCode.LeftThumbUpright"/></td><td>Left thumbstick up and right?</td></tr><tr><td><seecref="F:SharpDX.XInput.GamepadKeyCode.LeftThumbDownright"/></td><td>Left thumbstick down and right?</td></tr><tr><td><seecref="F:SharpDX.XInput.GamepadKeyCode.RightThumbDownLeft"/></td><td>Left thumbstick down and left?</td></tr><tr><td><seecref="F:SharpDX.XInput.GamepadKeyCode.RightThumbUp"/></td><td>Right thumbstick up?</td></tr><tr><td><seecref="F:SharpDX.XInput.GamepadKeyCode.RightThumbDown"/></td><td>Right thumbstick down?</
<!-- No matching elements were found for the following include tag --><includefile=".\..\Documentation\CodeComments.xml"path="/comments/comment[@id='XINPUT_KEYSTROKE']/*"/>
<!-- No matching elements were found for the following include tag --><includefile=".\..\Documentation\CodeComments.xml"path="/comments/comment[@id='XINPUT_KEYSTROKE::VirtualKey']/*"/>
<!-- No matching elements were found for the following include tag --><includefile=".\..\Documentation\CodeComments.xml"path="/comments/comment[@id='XINPUT_KEYSTROKE::Unicode']/*"/>
<!-- No matching elements were found for the following include tag --><includefile=".\..\Documentation\CodeComments.xml"path="/comments/comment[@id='XINPUT_KEYSTROKE::Flags']/*"/>
<!-- No matching elements were found for the following include tag --><includefile=".\..\Documentation\CodeComments.xml"path="/comments/comment[@id='XINPUT_KEYSTROKE::UserIndex']/*"/>
<!-- No matching elements were found for the following include tag --><includefile=".\..\Documentation\CodeComments.xml"path="/comments/comment[@id='XINPUT_KEYSTROKE::HidCode']/*"/>
<p>The <strong>dwPacketNumber</strong> member is incremented only if the status of the controller has changed since the controller was last polled.</p>
<!-- No matching elements were found for the following include tag --><includefile=".\..\Documentation\CodeComments.xml"path="/comments/comment[@id='XINPUT_STATE']/*"/>
<dd> State packet number. The packet number indicates whether there have been any changes in the state of the controller. If the <strong>dwPacketNumber</strong> member is the same in sequentially returned <seecref="T:SharpDX.XInput.State"/> structures, the controller state has not changed. </dd>
<!-- No matching elements were found for the following include tag --><includefile=".\..\Documentation\CodeComments.xml"path="/comments/comment[@id='XINPUT_STATE::dwPacketNumber']/*"/>
<!-- No matching elements were found for the following include tag --><includefile=".\..\Documentation\CodeComments.xml"path="/comments/comment[@id='XINPUT_STATE::Gamepad']/*"/>
<p>The left motor is the low-frequency rumble motor. The right motor is the high-frequency rumble motor. The two motors are not the same, and they create different vibration effects.</p>
<!-- No matching elements were found for the following include tag --><includefile=".\..\Documentation\CodeComments.xml"path="/comments/comment[@id='XINPUT_VIBRATION']/*"/>
<!-- No matching elements were found for the following include tag --><includefile=".\..\Documentation\CodeComments.xml"path="/comments/comment[@id='XINPUT_VIBRATION::wLeftMotorSpeed']/*"/>
<!-- No matching elements were found for the following include tag --><includefile=".\..\Documentation\CodeComments.xml"path="/comments/comment[@id='XINPUT_VIBRATION::wRightMotorSpeed']/*"/>