RetroArch
Macros | Enumerations | Functions | Variables
gx_joypad.c File Reference
#include <gccore.h>
#include <ogc/pad.h>
#include "../../tasks/tasks_internal.h"
Include dependency graph for gx_joypad.c:

Macros

#define WPAD_EXP_SICKSAXIS   252
 
#define WPAD_EXP_GAMECUBE   253
 
#define WPAD_EXP_NOCONTROLLER   254
 
#define NUM_DEVICES   1
 
#define MAX_PADS   4
 
#define GC_JOYSTICK_THRESHOLD   (48 * 256)
 
#define WII_JOYSTICK_THRESHOLD   (40 * 256)
 

Enumerations

enum  {
  GX_GC_A = 0, GX_GC_B = 1, GX_GC_X = 2, GX_GC_Y = 3,
  GX_GC_START = 4, GX_GC_HOME = 5, GX_GC_Z_TRIGGER = 6, GX_GC_L_TRIGGER = 7,
  GX_GC_R_TRIGGER = 8, GX_GC_UP = 9, GX_GC_DOWN = 10, GX_GC_LEFT = 11,
  GX_GC_RIGHT = 12, GX_QUIT_KEY = 62
}
 

Functions

static void reset_cb (void)
 
static const char * gx_joypad_name (unsigned pad)
 
static void handle_hotplug (unsigned port, uint32_t ptype)
 
static bool gx_joypad_button (unsigned port, uint16_t key)
 
static void gx_joypad_get_buttons (unsigned port, input_bits_t *state)
 
static int16_t gx_joypad_axis (unsigned port, uint32_t joyaxis)
 
static void gx_joypad_poll (void)
 
static bool gx_joypad_init (void *data)
 
static bool gx_joypad_query_pad (unsigned pad)
 
static void gx_joypad_destroy (void)
 

Variables

uint64_t lifecycle_state
 
static uint64_t pad_state [MAX_PADS]
 
static uint32_t pad_type [MAX_PADS] = { WPAD_EXP_NOCONTROLLER, WPAD_EXP_NOCONTROLLER, WPAD_EXP_NOCONTROLLER, WPAD_EXP_NOCONTROLLER }
 
static int16_t analog_state [MAX_PADS][2][2]
 
static bool g_menu = false
 
input_device_driver_t gx_joypad
 

Macro Definition Documentation

◆ GC_JOYSTICK_THRESHOLD

#define GC_JOYSTICK_THRESHOLD   (48 * 256)

◆ MAX_PADS

#define MAX_PADS   4

◆ NUM_DEVICES

#define NUM_DEVICES   1

◆ WII_JOYSTICK_THRESHOLD

#define WII_JOYSTICK_THRESHOLD   (40 * 256)

◆ WPAD_EXP_GAMECUBE

#define WPAD_EXP_GAMECUBE   253

◆ WPAD_EXP_NOCONTROLLER

#define WPAD_EXP_NOCONTROLLER   254

◆ WPAD_EXP_SICKSAXIS

#define WPAD_EXP_SICKSAXIS   252

Enumeration Type Documentation

◆ anonymous enum

anonymous enum
Enumerator
GX_GC_A 
GX_GC_B 
GX_GC_X 
GX_GC_Y 
GX_GC_START 
GX_GC_HOME 
GX_GC_Z_TRIGGER 
GX_GC_L_TRIGGER 
GX_GC_R_TRIGGER 
GX_GC_UP 
GX_GC_DOWN 
GX_GC_LEFT 
GX_GC_RIGHT 
GX_QUIT_KEY 

Function Documentation

◆ gx_joypad_axis()

static int16_t gx_joypad_axis ( unsigned  port,
uint32_t  joyaxis 
)
static

◆ gx_joypad_button()

static bool gx_joypad_button ( unsigned  port,
uint16_t  key 
)
static

◆ gx_joypad_destroy()

static void gx_joypad_destroy ( void  )
static
Here is the call graph for this function:

◆ gx_joypad_get_buttons()

static void gx_joypad_get_buttons ( unsigned  port,
input_bits_t state 
)
static

◆ gx_joypad_init()

static bool gx_joypad_init ( void data)
static
Here is the call graph for this function:

◆ gx_joypad_name()

static const char* gx_joypad_name ( unsigned  pad)
static
Here is the caller graph for this function:

◆ gx_joypad_poll()

static void gx_joypad_poll ( void  )
static
Here is the call graph for this function:
Here is the caller graph for this function:

◆ gx_joypad_query_pad()

static bool gx_joypad_query_pad ( unsigned  pad)
static

◆ handle_hotplug()

static void handle_hotplug ( unsigned  port,
uint32_t  ptype 
)
static
Here is the call graph for this function:
Here is the caller graph for this function:

◆ reset_cb()

static void reset_cb ( void  )
static
Here is the caller graph for this function:

Variable Documentation

◆ analog_state

int16_t analog_state[MAX_PADS][2][2]
static

◆ g_menu

bool g_menu = false
static

◆ gx_joypad

Initial value:
= {
"gx",
}
static void gx_joypad_destroy(void)
Definition: gx_joypad.c:502
static int16_t gx_joypad_axis(unsigned port, uint32_t joyaxis)
Definition: gx_joypad.c:175
static void gx_joypad_poll(void)
Definition: gx_joypad.c:314
#define NULL
Pointer to 0.
Definition: gctypes.h:65
static bool gx_joypad_query_pad(unsigned pad)
Definition: gx_joypad.c:497
static void gx_joypad_get_buttons(unsigned port, input_bits_t *state)
Definition: gx_joypad.c:165
static bool gx_joypad_init(void *data)
Definition: gx_joypad.c:474
static const char * gx_joypad_name(unsigned pad)
Definition: gx_joypad.c:121
static bool gx_joypad_button(unsigned port, uint16_t key)
Definition: gx_joypad.c:158

◆ lifecycle_state

uint64_t lifecycle_state

◆ pad_state

uint64_t pad_state[MAX_PADS]
static

◆ pad_type