RetroArch
Macros | Functions | Variables
wpad_driver.c File Reference
#include "../../include/wiiu/input.h"
Include dependency graph for wpad_driver.c:

Macros

#define PANIC_BUTTON_MASK   (VPAD_BUTTON_R | VPAD_BUTTON_L | VPAD_BUTTON_STICK_R | VPAD_BUTTON_STICK_L)
 

Functions

static void update_button_state (uint64_t *state, uint32_t held_buttons)
 
static void update_analog_state (int16_t state[3][2], VPADStatus *vpad)
 
static int16_t scale_touchpad (int16_t from_min, int16_t from_max, int16_t to_min, int16_t to_max, int16_t value)
 
static void get_calibrated_point (VPADTouchData *point, struct video_viewport *viewport, VPADStatus *vpad)
 
static void apply_clamping (VPADTouchData *point, struct video_viewport *viewport, bool *clamped)
 
static void get_touch_coordinates (VPADTouchData *point, VPADStatus *vpad, struct video_viewport *viewport, bool *clamped)
 
static void update_touch_state (int16_t state[3][2], uint64_t *buttons, VPADStatus *vpad)
 
static void check_panic_button (uint32_t held_buttons)
 
static void wpad_poll (void)
 
static bool wpad_init (void *data)
 
static bool wpad_query_pad (unsigned pad)
 
static void wpad_destroy (void)
 
static bool wpad_button (unsigned pad, uint16_t button_bit)
 
static void wpad_get_buttons (unsigned pad, input_bits_t *state)
 
static int16_t wpad_axis (unsigned pad, uint32_t axis)
 
static const char * wpad_name (unsigned pad)
 

Variables

static bool ready = false
 
static uint64_t button_state = 0
 
static int16_t analog_state [3][2]
 
input_device_driver_t wpad_driver
 

Macro Definition Documentation

◆ PANIC_BUTTON_MASK

#define PANIC_BUTTON_MASK   (VPAD_BUTTON_R | VPAD_BUTTON_L | VPAD_BUTTON_STICK_R | VPAD_BUTTON_STICK_L)

This driver handles the Wii U Gamepad.

  • For wiimote and wiimote attachments, see kpad_driver.c
  • For HID controllers, see hid_driver.c

Function Documentation

◆ apply_clamping()

static void apply_clamping ( VPADTouchData point,
struct video_viewport viewport,
bool clamped 
)
static
Here is the caller graph for this function:

◆ check_panic_button()

static void check_panic_button ( uint32_t  held_buttons)
static
Here is the call graph for this function:
Here is the caller graph for this function:

◆ get_calibrated_point()

static void get_calibrated_point ( VPADTouchData point,
struct video_viewport viewport,
VPADStatus vpad 
)
static
Here is the call graph for this function:
Here is the caller graph for this function:

◆ get_touch_coordinates()

static void get_touch_coordinates ( VPADTouchData point,
VPADStatus vpad,
struct video_viewport viewport,
bool clamped 
)
static
Here is the call graph for this function:
Here is the caller graph for this function:

◆ scale_touchpad()

static int16_t scale_touchpad ( int16_t  from_min,
int16_t  from_max,
int16_t  to_min,
int16_t  to_max,
int16_t  value 
)
static
Here is the caller graph for this function:

◆ update_analog_state()

static void update_analog_state ( int16_t  state[3][2],
VPADStatus vpad 
)
static
Here is the caller graph for this function:

◆ update_button_state()

static void update_button_state ( uint64_t state,
uint32_t  held_buttons 
)
static
Here is the caller graph for this function:

◆ update_touch_state()

static void update_touch_state ( int16_t  state[3][2],
uint64_t buttons,
VPADStatus vpad 
)
static
Here is the call graph for this function:
Here is the caller graph for this function:

◆ wpad_axis()

static int16_t wpad_axis ( unsigned  pad,
uint32_t  axis 
)
static
Here is the call graph for this function:

◆ wpad_button()

static bool wpad_button ( unsigned  pad,
uint16_t  button_bit 
)
static
Here is the call graph for this function:

◆ wpad_destroy()

static void wpad_destroy ( void  )
static

◆ wpad_get_buttons()

static void wpad_get_buttons ( unsigned  pad,
input_bits_t state 
)
static
Here is the call graph for this function:

◆ wpad_init()

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

◆ wpad_name()

static const char* wpad_name ( unsigned  pad)
static

◆ wpad_poll()

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

◆ wpad_query_pad()

static bool wpad_query_pad ( unsigned  pad)
static
Here is the caller graph for this function:

Variable Documentation

◆ analog_state

int16_t analog_state[3][2]
static

◆ button_state

uint64_t button_state = 0
static

◆ ready

bool ready = false
static

◆ wpad_driver

input_device_driver_t wpad_driver
Initial value:
=
{
"gamepad",
}
static void wpad_poll(void)
Definition: wpad_driver.c:171
static void wpad_destroy(void)
Definition: wpad_driver.c:206
static bool wpad_init(void *data)
Definition: wpad_driver.c:187
#define NULL
Pointer to 0.
Definition: gctypes.h:65
static bool wpad_query_pad(unsigned pad)
Definition: wpad_driver.c:201
static bool wpad_button(unsigned pad, uint16_t button_bit)
Definition: wpad_driver.c:211
static int16_t wpad_axis(unsigned pad, uint32_t axis)
Definition: wpad_driver.c:227
static void wpad_get_buttons(unsigned pad, input_bits_t *state)
Definition: wpad_driver.c:219
static const char * wpad_name(unsigned pad)
Definition: wpad_driver.c:238