RetroArch
Instance Methods | Protected Types | Properties | List of all members
GCExtendedGamepad Class Reference

#import <GCExtendedGamepad.h>

Inheritance diagram for GCExtendedGamepad:
[legend]
Collaboration diagram for GCExtendedGamepad:
[legend]

Instance Methods

(GCExtendedGamepadSnapshot *) - saveSnapshot
 

Protected Types

typedef void(^ GCExtendedGamepadValueChangedHandler) (GCExtendedGamepad *gamepad, GCControllerElement *element)
 

Properties

GCControllercontroller
 
GCExtendedGamepadValueChangedHandler valueChangedHandler
 
GCControllerDirectionPaddpad
 
GCControllerButtonInputbuttonA
 
GCControllerButtonInputbuttonB
 
GCControllerButtonInputbuttonX
 
GCControllerButtonInputbuttonY
 
GCControllerDirectionPadleftThumbstick
 
GCControllerDirectionPadrightThumbstick
 
GCControllerButtonInputleftShoulder
 
GCControllerButtonInputrightShoulder
 
GCControllerButtonInputleftTrigger
 
GCControllerButtonInputrightTrigger
 

Detailed Description

Extended Gamepad profile. Has all the physical features of a Standard Gamepad and more.

In comparison to the Standard gamepad, The directional pad on an Extended gamepad is optionally analog as the two thumbsticks provided are required to be analog.

All controller profiles provide a base level of information about the controller they belong to.

A profile maps the hardware notion of a controller into a logical controller. One that a developer can design for and depend on, no matter the underlying hardware.

Member Typedef Documentation

◆ GCExtendedGamepadValueChangedHandler

- (typedef void(^ GCExtendedGamepadValueChangedHandler) (GCExtendedGamepad *gamepad, GCControllerElement *element))
protected

Set this block if you want to be notified when a value on a element changed. If multiple elements have changed this block will be called for each element that changed. As elements in a collection, such as the axis in a dpad, tend to change at the same time and thus will only call this once with the collection as the element.

Parameters
gamepadthis gamepad that is being used to map the raw input data into logical values on controller elements such as the dpad or the buttons.
elementthe element that has been modified.

Method Documentation

◆ saveSnapshot()

- (GCExtendedGamepadSnapshot *) saveSnapshot

Polls the state vector of the controller and saves it to a snapshot. The snapshot is stored in a device independent format that can be serialized and used at a later date. This is useful for features such as quality assurance, save game or replay functionality among many.

If your application is heavily multithreaded this may also be useful to guarantee atomicity of input handling as a snapshot will not change based on user input once it is taken.

Property Documentation

◆ buttonA

- (GCControllerButtonInput*) buttonA
readatomicassign

All face buttons are required to be analog in the Extended profile. These must be arranged in the diamond pattern given below:

Y / \ X B \ / A

◆ buttonB

- (GCControllerButtonInput*) buttonB
readatomicassign

◆ buttonX

- (GCControllerButtonInput*) buttonX
readatomicassign

◆ buttonY

- (GCControllerButtonInput*) buttonY
readatomicassign

◆ controller

- (GCController*) controller
readatomicassign

A profile keeps a reference to the controller that this profile is mapping input from.

◆ dpad

- (GCControllerDirectionPad*) dpad
readatomicassign

Required to be analog in the Extended profile. All the elements of this directional input are thus analog.

◆ leftShoulder

- (GCControllerButtonInput*) leftShoulder
readatomicassign

Shoulder buttons are required to be analog inputs.

◆ leftThumbstick

- (GCControllerDirectionPad*) leftThumbstick
readatomicassign

A thumbstick is a 2-axis control that is physically required to be analog. All the elements of this directional input are thus analog.

◆ leftTrigger

- (GCControllerButtonInput*) leftTrigger
readatomicassign

Triggers are required to be analog inputs. Common uses would be acceleration and decelleration in a driving game for example.

◆ rightShoulder

- (GCControllerButtonInput*) rightShoulder
readatomicassign

Shoulder buttons are required to be analog inputs.

◆ rightThumbstick

- (GCControllerDirectionPad*) rightThumbstick
readatomicassign

A thumbstick is a 2-axis control that is physically required to be analog. All the elements of this directional input are thus analog.

◆ rightTrigger

- (GCControllerButtonInput*) rightTrigger
readatomicassign

◆ valueChangedHandler

- (GCExtendedGamepadValueChangedHandler) valueChangedHandler
readwriteatomiccopy

The documentation for this class was generated from the following file: