Structure

GCGamepadSnapShotDataV100

A structure that holds a snapshot of a gamepad controller’s input data.

Declaration

struct GCGamepadSnapShotDataV100

Topics

Instance Properties

var buttonA: Float

The value of the A button. The range of permissible values is 0.0 to 1.0, inclusive.

var buttonB: Float

The value of the B button. The range of permissible values is 0.0 to 1.0, inclusive.

var buttonX: Float

The value of the X button. The range of permissible values is 0.0 to 1.0, inclusive.

var buttonY: Float

The value of the Y button. The range of permissible values is 0.0 to 1.0, inclusive.

var dpadX: Float

The value of the horizontal axis of the dpad. The range of permissible values is -1.0 to 1.0, inclusive.

var dpadY: Float

The value of the vertical axis of the dpad. The range of permissible values is -1.0 to 1.0, inclusive.

var leftShoulder: Float

The value of the left shoulder button. The range of permissible values is 0.0 to 1.0, inclusive.

var rightShoulder: Float

The value of the right shoulder button. The range of permissible values is 0.0 to 1.0, inclusive.

var size: UInt16

The size of the recorded structure, in bytes.

var version: UInt16

A value that indicates the version number of the data structure. For the structure defined here, the Game Controller framework uses a value of 0x0100.

See Also

Flattening a Snapshot to Memory

func NSDataFromGCGamepadSnapShotDataV100(UnsafeMutablePointer<GCGamepadSnapShotDataV100>?) -> Data?

Encapsulates the controller data from a gamepad structure into an NSData object.

Deprecated
func GCGamepadSnapShotDataV100FromNSData(UnsafeMutablePointer<GCGamepadSnapShotDataV100>?, Data?) -> Bool

Copies the recorded data from a gamepad snapshot into a readable structure.

Deprecated