37 #define WPAD_MAX_IR_DOTS 4 49 #define WPAD_BUTTON_2 0x0001 50 #define WPAD_BUTTON_1 0x0002 51 #define WPAD_BUTTON_B 0x0004 52 #define WPAD_BUTTON_A 0x0008 53 #define WPAD_BUTTON_MINUS 0x0010 54 #define WPAD_BUTTON_HOME 0x0080 55 #define WPAD_BUTTON_LEFT 0x0100 56 #define WPAD_BUTTON_RIGHT 0x0200 57 #define WPAD_BUTTON_DOWN 0x0400 58 #define WPAD_BUTTON_UP 0x0800 59 #define WPAD_BUTTON_PLUS 0x1000 61 #define WPAD_NUNCHUK_BUTTON_Z (0x0001<<16) 62 #define WPAD_NUNCHUK_BUTTON_C (0x0002<<16) 64 #define WPAD_CLASSIC_BUTTON_UP (0x0001<<16) 65 #define WPAD_CLASSIC_BUTTON_LEFT (0x0002<<16) 66 #define WPAD_CLASSIC_BUTTON_ZR (0x0004<<16) 67 #define WPAD_CLASSIC_BUTTON_X (0x0008<<16) 68 #define WPAD_CLASSIC_BUTTON_A (0x0010<<16) 69 #define WPAD_CLASSIC_BUTTON_Y (0x0020<<16) 70 #define WPAD_CLASSIC_BUTTON_B (0x0040<<16) 71 #define WPAD_CLASSIC_BUTTON_ZL (0x0080<<16) 72 #define WPAD_CLASSIC_BUTTON_FULL_R (0x0200<<16) 73 #define WPAD_CLASSIC_BUTTON_PLUS (0x0400<<16) 74 #define WPAD_CLASSIC_BUTTON_HOME (0x0800<<16) 75 #define WPAD_CLASSIC_BUTTON_MINUS (0x1000<<16) 76 #define WPAD_CLASSIC_BUTTON_FULL_L (0x2000<<16) 77 #define WPAD_CLASSIC_BUTTON_DOWN (0x4000<<16) 78 #define WPAD_CLASSIC_BUTTON_RIGHT (0x8000<<16) 80 #define WPAD_GUITAR_HERO_3_BUTTON_STRUM_UP (0x0001<<16) 81 #define WPAD_GUITAR_HERO_3_BUTTON_YELLOW (0x0008<<16) 82 #define WPAD_GUITAR_HERO_3_BUTTON_GREEN (0x0010<<16) 83 #define WPAD_GUITAR_HERO_3_BUTTON_BLUE (0x0020<<16) 84 #define WPAD_GUITAR_HERO_3_BUTTON_RED (0x0040<<16) 85 #define WPAD_GUITAR_HERO_3_BUTTON_ORANGE (0x0080<<16) 86 #define WPAD_GUITAR_HERO_3_BUTTON_PLUS (0x0400<<16) 87 #define WPAD_GUITAR_HERO_3_BUTTON_MINUS (0x1000<<16) 88 #define WPAD_GUITAR_HERO_3_BUTTON_STRUM_DOWN (0x4000<<16) 111 #define WPAD_ERR_NONE 0 112 #define WPAD_ERR_NO_CONTROLLER -1 113 #define WPAD_ERR_NOT_READY -2 114 #define WPAD_ERR_TRANSFER -3 115 #define WPAD_ERR_NONEREGISTERED -4 116 #define WPAD_ERR_UNKNOWN -5 117 #define WPAD_ERR_BAD_CHANNEL -6 118 #define WPAD_ERR_QUEUE_EMPTY -7 119 #define WPAD_ERR_BADVALUE -8 120 #define WPAD_ERR_BADCONF -9 122 #define WPAD_DATA_BUTTONS 0x01 123 #define WPAD_DATA_ACCEL 0x02 124 #define WPAD_DATA_EXPANSION 0x04 125 #define WPAD_DATA_IR 0x08 127 #define WPAD_ENC_FIRST 0x00 128 #define WPAD_ENC_CONT 0x01 130 #define WPAD_THRESH_IGNORE -1 131 #define WPAD_THRESH_ANY 0 132 #define WPAD_THRESH_DEFAULT_BUTTONS 0 133 #define WPAD_THRESH_DEFAULT_IR WPAD_THRESH_IGNORE 134 #define WPAD_THRESH_DEFAULT_ACCEL 20 135 #define WPAD_THRESH_DEFAULT_JOYSTICK 2 136 #define WPAD_THRESH_DEFAULT_BALANCEBOARD 60 137 #define WPAD_THRESH_DEFAULT_MOTION_PLUS 100 void WPAD_SetPowerButtonCallback(WPADShutdownCallback cb)
Definition: wpad.c:881
void WPAD_Expansion(int chan, struct expansion_t *exp)
u32 btns_d
Definition: wpad.h:152
int32_t s32
32bit signed integer
Definition: gctypes.h:24
s32 WPAD_GetStatus()
Definition: wpad.c:812
void WPAD_GForce(int chan, struct gforce_t *gforce)
Definition: wpad.c:1096
u32 WPAD_ButtonsDown(int chan)
s32 WPAD_SetDataFormat(s32 chan, s32 fmt)
s32 WPAD_DroppedEvents(s32 chan)
s32 WPAD_SetIdleThresholds(s32 chan, s32 btns, s32 ir, s32 accel, s32 js, s32 wb, s32 mp)
GLenum GLuint GLenum GLsizei const GLchar * buf
Definition: glext.h:8418
Generic expansion device plugged into wiimote.
Definition: wiiuse.h:528
s32 WPAD_SetEventBufs(s32 chan, WPADData *bufs, u32 cnt)
Definition: libretro.h:2275
u32 WPAD_ButtonsUp(int chan)
GLenum GLsizei len
Definition: glext.h:7389
void WPAD_EncodeData(WPADEncStatus *info, u32 flag, const s16 *pcmSamples, s32 numSamples, u8 *encData)
void(* WPADDataCallback)(s32 chan, const WPADData *data)
Definition: wpad.h:167
GLboolean enable
Definition: glext.h:12027
void WPAD_SetBatteryDeadCallback(WPADShutdownCallback cb)
Definition: wpad.c:893
struct _wpad_encstatus WPADEncStatus
s16 err
Definition: wpad.h:145
typedef void(__stdcall *PFN_DESTRUCTION_CALLBACK)(void *pData)
#define exp(a)
Definition: math.h:32
GLsizei GLsizei GLenum GLenum const GLvoid * data
Definition: glext.h:6303
Gravity force struct.
Definition: wiiuse.h:317
struct orient_t orient
Definition: wpad.h:157
void WPAD_Accel(int chan, struct vec3w_t *accel)
Definition: wpad.c:1102
s32 WPAD_Disconnect(s32 chan)
Definition: wpad.c:902
s32 WPAD_ControlSpeaker(s32 chan, s32 enable)
u32 btns_l
Definition: wpad.h:151
u8 WPAD_BatteryLevel(int chan)
Definition: wpad.c:1078
s32 WPAD_ReadEvent(s32 chan, WPADData *data)
Definition: wpad.c:671
u32 btns_u
Definition: wpad.h:153
GLenum type
Definition: glext.h:6233
void WPAD_IR(int chan, struct ir_t *ir)
Definition: wpad.c:1084
IR struct. Hold all data related to the IR tracking.
Definition: wiiuse.h:377
s32 WPAD_SetVRes(s32 chan, u32 xres, u32 yres)
Definition: wpad.c:784
u32 WPAD_ButtonsHeld(int chan)
struct _wpad_data WPADData
s32 WPAD_SendStreamData(s32 chan, void *buf, u32 len)
struct ir_t ir
Definition: wpad.h:155
u32 btns_h
Definition: wpad.h:150
s32 WPAD_IsSpeakerEnabled(s32 chan)
void WPAD_Shutdown()
Definition: wpad.c:928
const GLenum * bufs
Definition: glext.h:6666
int16_t s16
16bit signed integer
Definition: gctypes.h:23
s32 WPAD_SetMotionPlus(s32 chan, u8 enable)
Definition: wpad.c:756
WPADData * WPAD_Data(int chan)
Definition: wpad.c:1072
struct vec3w_t accel
Definition: wpad.h:156
void(* WPADShutdownCallback)(s32 chan)
Definition: wpad.h:168
struct expansion_t exp
Definition: wpad.h:159
s32 WPAD_Rumble(s32 chan, int status)
struct gforce_t gforce
Definition: wpad.h:158
void WPAD_SetIdleTimeout(u32 seconds)
Definition: wpad.c:958
void WPAD_Orientation(int chan, struct orient_t *orient)
Definition: wpad.c:1090
s32 WPAD_Probe(s32 chan, u32 *type)
Definition: wpad.c:824
Orientation struct.
Definition: wiiuse.h:303
uint8_t u8
8bit unsigned integer
Definition: gctypes.h:17
uint32_t u32
32bit unsigned integer
Definition: gctypes.h:19
s32 WPAD_Init()
Definition: wpad.c:590
u32 data_present
Definition: wpad.h:147
s32 WPAD_ReadPending(s32 chan, WPADDataCallback datacb)
Definition: wpad.c:744
u8 battery_level
Definition: wpad.h:148