RetroArch
Classes | Enumerations | Variables
GCController.h File Reference
#import "GameController.h"
Include dependency graph for GCController.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

class  GCController
 

Enumerations

enum  { GCControllerPlayerIndexUnset = -1 }
 

Variables

GAMECONTROLLER_EXTERN NSString *const GCControllerDidConnectNotification
 
GAMECONTROLLER_EXTERN NSString *const GCControllerDidDisconnectNotification
 

Enumeration Type Documentation

◆ anonymous enum

anonymous enum

This is the player index that a connected controller will have if it has never been assigned a player index on the current system. Controllers retain the player index they have been assigned between game sessions, so if you wish to unset the player index of a controller set it back to this value.

Enumerator
GCControllerPlayerIndexUnset 

Variable Documentation

◆ GCControllerDidConnectNotification

GAMECONTROLLER_EXTERN NSString* const GCControllerDidConnectNotification

Use these constants with NSNotificationCenter to listen to connection and disconnection events.

Use GCControllerDidConnectNotification for observing connections of controllers. Use GCControllerDidDisconnectNotification for observing disconnections of controllers.

Connections and disconnections of controllers will also be reflected in the controllers array of the GCController class.

The 'object' property of the notification will contain the GCController that was connected or disconnected. For example:

  • (void)controllerDidConnect:(NSNotification *)note {

GCController *controller = note.object;

.... }

See also
NSNotificationCenter
+ controllers (GCController)

◆ GCControllerDidDisconnectNotification

GAMECONTROLLER_EXTERN NSString* const GCControllerDidDisconnectNotification