Show / Hide Table of Contents

Class XboxGamepadWrapper

The wrapper for the xbox gamepad to handle update queuing.

Inheritance
System.Object
XboxGamepadWrapper
Implements
System.IDisposable
Inherited Members
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.ToString()
Namespace: Phoenix.Devices
Assembly: Phoenix.Devices.Xbox.dll
Syntax
public class XboxGamepadWrapper : IDisposable

Constructors

View Source

XboxGamepadWrapper(ExtendedXboxDevice, String, IPhoenixLogger, Action<GamepadStatus>)

Initializes a new instance of the XboxGamepadWrapper class

Declaration
public XboxGamepadWrapper(ExtendedXboxDevice device, string consoleFriendlyName, IPhoenixLogger logger, Action<GamepadStatus> statusChangedCallback)
Parameters
Type Name Description
ExtendedXboxDevice device

The console that the gamepad is for.

System.String consoleFriendlyName

The console's friendly name.

IPhoenixLogger logger

The logging manager.

System.Action<GamepadStatus> statusChangedCallback

The callback to call when the status changes.

Fields

View Source

ConnectDelayMS

How long to wait after connecting, as specified in the documentation.

Declaration
public const int ConnectDelayMS = 2000
Field Value
Type Description
System.Int32
View Source

ReconnectDelayMS

Re-connection delay on gamepads in bad state

Declaration
public const int ReconnectDelayMS = 3000
Field Value
Type Description
System.Int32

Properties

View Source

State

Gets or sets the gamepad state.

Declaration
public XboxGamepadState State { get; set; }
Property Value
Type Description
XboxGamepadState

Methods

View Source

Disconnect()

Disconnects the gamepad from the xbox.

Declaration
public void Disconnect()
View Source

Dispose()

Disconnect gamepad on dispose

Declaration
public void Dispose()
View Source

Dispose(Boolean)

Perform finalization

Declaration
protected virtual void Dispose(bool disposing)
Parameters
Type Name Description
System.Boolean disposing

Whether disposing managed resources

View Source

NotifyStateChanged()

Notifies the gamepad that the state is updated so it pushes it to the xbox gamepad when the update is called.

Declaration
public void NotifyStateChanged()
View Source

PairWithUser(UserInfo, Boolean)

Pairs the gamepad with the user. User must be signed in to pair.

Declaration
public Task PairWithUser(UserInfo user, bool exclusive)
Parameters
Type Name Description
UserInfo user

the user to pair with the gamepad.

System.Boolean exclusive

Whether or not the pairing is exclusive (removes all other gamepads from the user)

Returns
Type Description
System.Threading.Tasks.Task

awaitable task

Implements

System.IDisposable
  • View Source
In This Article
Back to top Generated by DocFX