RetroArch
vpad.h
Go to the documentation of this file.
1 #pragma once
2 #include <wiiu/types.h>
3 
4 #ifdef __cplusplus
5 extern "C" {
6 #endif
7 
8 typedef enum VPADButtonBits {
41 
42 typedef enum VPADButtons
43 {
44  VPAD_BUTTON_SYNC = 0x00000001,
45  VPAD_BUTTON_HOME = 0x00000002,
46  VPAD_BUTTON_MINUS = 0x00000004,
47  VPAD_BUTTON_PLUS = 0x00000008,
48  VPAD_BUTTON_R = 0x00000010,
49  VPAD_BUTTON_L = 0x00000020,
50  VPAD_BUTTON_ZR = 0x00000040,
51  VPAD_BUTTON_ZL = 0x00000080,
52  VPAD_BUTTON_DOWN = 0x00000100,
53  VPAD_BUTTON_UP = 0x00000200,
54  VPAD_BUTTON_RIGHT = 0x00000400,
55  VPAD_BUTTON_LEFT = 0x00000800,
56  VPAD_BUTTON_Y = 0x00001000,
57  VPAD_BUTTON_X = 0x00002000,
58  VPAD_BUTTON_B = 0x00004000,
59  VPAD_BUTTON_A = 0x00008000,
60  VPAD_BUTTON_TV = 0x00010000,
61  VPAD_BUTTON_STICK_R = 0x00020000,
62  VPAD_BUTTON_STICK_L = 0x00040000,
63  VPAD_BUTTON_TOUCH = 0x00080000,
64  VPAD_BUTTON_UNUSED1 = 0x00100000,
65  VPAD_BUTTON_UNUSED2 = 0x00200000,
66  VPAD_BUTTON_UNUSED3 = 0x00400000,
75 } VPADButtons;
76 
77 #define VPAD_MASK_EMULATED_STICKS (VPAD_STICK_R_EMULATION_LEFT | \
78  VPAD_STICK_R_EMULATION_RIGHT | \
79  VPAD_STICK_R_EMULATION_UP | \
80  VPAD_STICK_R_EMULATION_DOWN | \
81  VPAD_STICK_L_EMULATION_LEFT | \
82  VPAD_STICK_L_EMULATION_RIGHT | \
83  VPAD_STICK_L_EMULATION_UP | \
84  VPAD_STICK_L_EMULATION_DOWN)
85 #define VPAD_MASK_BUTTONS ~VPAD_MASK_EMULATED_STICKS
86 
88 {
90  VPAD_VALID = 0x0,
91 
94 
98 
99 
100 typedef enum VPADReadError
101 {
105 } VPADReadError;
106 
107 typedef struct VPADVec2D
108 {
109  float x;
110  float y;
111 }VPADVec2D;
112 
113 typedef struct VPADVec3D
114 {
115  float x;
116  float y;
117  float z;
118 }VPADVec3D;
119 
120 typedef struct VPADTouchData
121 {
127 
128 typedef struct VPADAccStatus
129 {
130  float unk1;
131  float unk2;
132  float unk3;
133  float unk4;
134  float unk5;
137 
138 typedef struct VPADGyroStatus
139 {
140  float unk1;
141  float unk2;
142  float unk3;
143  float unk4;
144  float unk5;
145  float unk6;
147 
148 typedef struct VPADStatus
149 {
153 
158 
160 
163 
166 
169 
171 
178 }VPADStatus;
179 
181 void VPADInit();
182 
184 void VPADGetTPCalibratedPoint(uint32_t chan, VPADTouchData *calibratedData, VPADTouchData *uncalibratedData);
185 
186 #ifdef __cplusplus
187 }
188 #endif
VPADGyroStatus gyro
Definition: vpad.h:157
Definition: vpad.h:16
VPADVec2D rightStick
Definition: vpad.h:155
const GLuint * buffers
Definition: glext.h:6556
Definition: vpad.h:104
Definition: vpad.h:10
Definition: vpad.h:138
Definition: vpad.h:69
float unk3
Definition: vpad.h:142
float y
Definition: vpad.h:110
Definition: vpad.h:62
Definition: vpad.h:44
float unk1
Definition: vpad.h:140
float y
Definition: vpad.h:116
float unk2
Definition: vpad.h:141
uint16_t validity
Definition: vpad.h:125
Definition: vpad.h:23
Definition: vpad.h:107
Definition: vpad.h:53
VPADButtons
Definition: vpad.h:42
Definition: vpad.h:56
Definition: vpad.h:128
uint8_t slideVolumeEx
Definition: vpad.h:176
Definition: vpad.h:64
Definition: vpad.h:61
uint32_t trigger
Definition: vpad.h:151
uint16_t touched
Definition: vpad.h:124
VPADButtonBits
Definition: vpad.h:8
Definition: vpad.h:55
struct VPADVec3D VPADVec3D
Definition: vpad.h:73
Definition: vpad.h:27
Definition: vpad.h:50
Definition: vpad.h:28
Definition: vpad.h:12
float unk3
Definition: vpad.h:132
VPADAccStatus accelorometer
Definition: vpad.h:156
Definition: vpad.h:24
Definition: vpad.h:20
GLuint GLuint GLsizei count
Definition: glext.h:6292
uint32_t __unknown1[0xA]
Definition: vpad.h:170
float unk4
Definition: vpad.h:143
Definition: vpad.h:68
Definition: vpad.h:103
Definition: vpad.h:15
uint32_t hold
Definition: vpad.h:150
VPADVec2D vertical
Definition: vpad.h:135
uint8_t micStatus
Definition: vpad.h:175
Definition: vpad.h:102
uint16_t __unknown0
Definition: vpad.h:159
Definition: vpad.h:30
VPADVec3D mag
Definition: vpad.h:172
float x
Definition: vpad.h:109
Definition: vpad.h:120
Definition: vpad.h:22
float unk1
Definition: vpad.h:130
Definition: vpad.h:13
Definition: vpad.h:72
Definition: vpad.h:67
Definition: vpad.h:52
float unk2
Definition: vpad.h:131
int32_t VPADRead(uint32_t chan, VPADStatus *buffers, uint32_t count, VPADReadError *error)
Definition: vpad.h:65
struct VPADStatus VPADStatus
Definition: vpad.h:9
Definition: vpad.h:31
Definition: vpad.h:33
VPADTouchData tpNormal
Definition: vpad.h:162
uint32_t release
Definition: vpad.h:152
struct VPADAccStatus VPADAccStatus
static l_noret error(LoadState *S, const char *why)
Definition: lundump.c:39
Definition: vpad.h:18
float unk6
Definition: vpad.h:145
float z
Definition: vpad.h:117
Definition: vpad.h:113
uint32_t __unknown2[0x2]
Definition: vpad.h:177
Definition: vpad.h:35
struct VPADVec2D VPADVec2D
Definition: vpad.h:21
Definition: vpad.h:39
Definition: vpad.h:32
Definition: vpad.h:46
uint16_t x
Definition: vpad.h:122
Definition: vpad.h:66
Definition: vpad.h:37
signed int int32_t
Definition: stdint.h:123
float unk5
Definition: vpad.h:144
void VPADInit()
struct VPADGyroStatus VPADGyroStatus
void VPADGetTPCalibratedPoint(uint32_t chan, VPADTouchData *calibratedData, VPADTouchData *uncalibratedData)
Definition: vpad.h:14
Definition: vpad.h:29
Definition: vpad.h:71
Definition: vpad.h:47
Definition: vpad.h:25
Definition: vpad.h:60
Definition: vpad.h:148
Definition: vpad.h:96
Definition: vpad.h:58
float x
Definition: vpad.h:115
Definition: vpad.h:74
Definition: vpad.h:51
struct VPADTouchData VPADTouchData
VPADVec2D leftStick
Definition: vpad.h:154
Definition: vpad.h:57
Definition: vpad.h:26
Definition: vpad.h:63
uint8_t battery
Definition: vpad.h:174
Definition: vpad.h:59
uint16_t y
Definition: vpad.h:123
float unk5
Definition: vpad.h:134
Definition: vpad.h:36
VPADTouchPadValidity
Definition: vpad.h:87
Definition: vpad.h:90
VPADTouchData tpFiltered1
Definition: vpad.h:165
Definition: vpad.h:11
Definition: vpad.h:93
unsigned short uint16_t
Definition: stdint.h:125
Definition: vpad.h:49
unsigned char uint8_t
Definition: stdint.h:124
unsigned int uint32_t
Definition: stdint.h:126
Definition: vpad.h:19
Definition: vpad.h:17
Definition: vpad.h:48
Definition: vpad.h:70
VPADTouchData tpFiltered2
Definition: vpad.h:168
Definition: vpad.h:54
uint8_t slideVolume
Definition: vpad.h:173
float unk4
Definition: vpad.h:133
VPADReadError
Definition: vpad.h:100
Definition: vpad.h:45