RetroArch
GCGamepadSnapshot.h
Go to the documentation of this file.
1 //
2 // GCGamepadSnapshot.h
3 // GameController
4 //
5 // Copyright (c) 2012 Apple Inc. All rights reserved.
6 //
7 
8 #import "GameController.h"
9 
24 @property (copy) NSData *snapshotData;
25 
26 - (instancetype)initWithSnapshotData:(NSData *)data;
27 - (instancetype)initWithController:(GCController *)controller snapshotData:(NSData *)data;
28 
29 @end
30 
31 #pragma pack(push, 1)
32 typedef struct {
33  // Standard information
34  uint16_t version; //0x0100
35  uint16_t size; //sizeof(GCGamepadSnapShotDataV100) or larger
36 
37  // Standard gamepad data
38  // Axes in the range [-1.0, 1.0]
39  float_t dpadX;
40  float_t dpadY;
41 
42  // Buttons in the range [0.0, 1.0]
43  float_t buttonA;
44  float_t buttonB;
45  float_t buttonX;
46  float_t buttonY;
47  float_t leftShoulder;
48  float_t rightShoulder;
49 
51 #pragma pack(pop)
52 
59 
GAMECONTROLLER_EXPORT NSData * NSDataFromGCGamepadSnapShotDataV100(GCGamepadSnapShotDataV100 *snapshotData)
float_t dpadY
Definition: GCGamepadSnapshot.h:40
float_t buttonA
Definition: GCGamepadSnapshot.h:43
float_t dpadX
Definition: GCGamepadSnapshot.h:39
Definition: ibxm.h:9
GLsizei GLsizei GLenum GLenum const GLvoid * data
Definition: glext.h:6303
Definition: GCGamepadSnapshot.h:23
float_t rightShoulder
Definition: GCGamepadSnapshot.h:48
#define GAMECONTROLLER_EXPORT
Definition: GameController.h:18
float_t buttonY
Definition: GCGamepadSnapshot.h:46
float_t leftShoulder
Definition: GCGamepadSnapshot.h:47
NSData * snapshotData
Definition: GCGamepadSnapshot.h:24
Definition: GCController.h:56
Definition: GCGamepad.h:22
uint16_t size
Definition: GCGamepadSnapshot.h:35
unsigned int BOOL
Definition: gctypes.h:51
GCController * controller
Definition: GCGamepad.h:28
float_t buttonX
Definition: GCGamepadSnapshot.h:45
Definition: GCGamepadSnapshot.h:32
uint16_t version
Definition: GCGamepadSnapshot.h:34
GAMECONTROLLER_EXPORT BOOL GCGamepadSnapShotDataV100FromNSData(GCGamepadSnapShotDataV100 *snapshotData, NSData *data)
float_t buttonB
Definition: GCGamepadSnapshot.h:44
unsigned short uint16_t
Definition: stdint.h:125