RetroArch
Macros | Functions | Variables
rwebpad_joypad.c File Reference
#include <stdint.h>
#include <stddef.h>
#include <boolean.h>
#include <retro_miscellaneous.h>
#include <emscripten/html5.h>
#include "../input_driver.h"
#include "../../tasks/tasks_internal.h"
#include "../../verbosity.h"
Include dependency graph for rwebpad_joypad.c:

Macros

#define CLAMPDOUBLE(x)   MIN(1.0, MAX(-1.0, (x)))
 

Functions

static EM_BOOL rwebpad_gamepad_cb (int event_type, const EmscriptenGamepadEvent *gamepad_event, void *user_data)
 
static bool rwebpad_joypad_init (void *data)
 
static const char * rwebpad_joypad_name (unsigned pad)
 
static bool rwebpad_joypad_button (unsigned port_num, uint16_t joykey)
 
static void rwebpad_joypad_get_buttons (unsigned port_num, input_bits_t *state)
 
static int16_t rwebpad_joypad_axis (unsigned port_num, uint32_t joyaxis)
 
static void rwebpad_joypad_poll (void)
 
static bool rwebpad_joypad_query_pad (unsigned pad)
 
static void rwebpad_joypad_destroy (void)
 

Variables

static bool g_rwebpad_initialized
 
input_device_driver_t rwebpad_joypad
 

Macro Definition Documentation

◆ CLAMPDOUBLE

#define CLAMPDOUBLE (   x)    MIN(1.0, MAX(-1.0, (x)))

Function Documentation

◆ rwebpad_gamepad_cb()

static EM_BOOL rwebpad_gamepad_cb ( int  event_type,
const EmscriptenGamepadEvent *  gamepad_event,
void user_data 
)
static
Here is the call graph for this function:
Here is the caller graph for this function:

◆ rwebpad_joypad_axis()

static int16_t rwebpad_joypad_axis ( unsigned  port_num,
uint32_t  joyaxis 
)
static

◆ rwebpad_joypad_button()

static bool rwebpad_joypad_button ( unsigned  port_num,
uint16_t  joykey 
)
static

◆ rwebpad_joypad_destroy()

static void rwebpad_joypad_destroy ( void  )
static

◆ rwebpad_joypad_get_buttons()

static void rwebpad_joypad_get_buttons ( unsigned  port_num,
input_bits_t state 
)
static

◆ rwebpad_joypad_init()

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

◆ rwebpad_joypad_name()

static const char* rwebpad_joypad_name ( unsigned  pad)
static

◆ rwebpad_joypad_poll()

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

◆ rwebpad_joypad_query_pad()

static bool rwebpad_joypad_query_pad ( unsigned  pad)
static

Variable Documentation

◆ g_rwebpad_initialized

bool g_rwebpad_initialized
static

◆ rwebpad_joypad

input_device_driver_t rwebpad_joypad
Initial value:
= {
"rwebpad",
}
static void rwebpad_joypad_destroy(void)
Definition: rwebpad_joypad.c:203
static int16_t rwebpad_joypad_axis(unsigned port_num, uint32_t joyaxis)
Definition: rwebpad_joypad.c:153
static const char * rwebpad_joypad_name(unsigned pad)
Definition: rwebpad_joypad.c:106
static void rwebpad_joypad_get_buttons(unsigned port_num, input_bits_t *state)
Definition: rwebpad_joypad.c:133
#define NULL
Pointer to 0.
Definition: gctypes.h:65
static bool rwebpad_joypad_query_pad(unsigned pad)
Definition: rwebpad_joypad.c:189
static void rwebpad_joypad_poll(void)
Definition: rwebpad_joypad.c:183
static bool rwebpad_joypad_button(unsigned port_num, uint16_t joykey)
Definition: rwebpad_joypad.c:119
static bool rwebpad_joypad_init(void *data)
Definition: rwebpad_joypad.c:72