RetroArch
Classes | Typedefs | Functions | Variables
sdl_input.c File Reference
#include <stdint.h>
#include <stdlib.h>
#include <boolean.h>
#include <string/stdstring.h>
#include <libretro.h>
#include "SDL.h"
#include "../input_driver.h"
#include "../input_keymaps.h"
#include "../../gfx/video_driver.h"
#include "../../verbosity.h"
#include "../../tasks/tasks_internal.h"
Include dependency graph for sdl_input.c:

Classes

struct  sdl_input
 

Typedefs

typedef struct sdl_input sdl_input_t
 

Functions

static voidsdl_input_init (const char *joypad_driver)
 
static bool sdl_key_pressed (int key)
 
static int16_t sdl_analog_pressed (sdl_input_t *sdl, const struct retro_keybind *binds, unsigned idx, unsigned id)
 
static int16_t sdl_joypad_device_state (sdl_input_t *sdl, rarch_joypad_info_t joypad_info, const struct retro_keybind *binds, unsigned port, unsigned id, enum input_device_type *device)
 
static int16_t sdl_mouse_device_state (sdl_input_t *sdl, unsigned id)
 
static int16_t sdl_pointer_device_state (sdl_input_t *sdl, unsigned idx, unsigned id, bool screen)
 
static int16_t sdl_lightgun_device_state (sdl_input_t *sdl, unsigned id)
 
static int16_t sdl_input_state (void *data, rarch_joypad_info_t joypad_info, const struct retro_keybind **binds, unsigned port, unsigned device, unsigned idx, unsigned id)
 
static void sdl_input_free (void *data)
 
static void sdl_grab_mouse (void *data, bool state)
 
static bool sdl_set_rumble (void *data, unsigned port, enum retro_rumble_effect effect, uint16_t strength)
 
static const input_device_driver_tsdl_get_joypad_driver (void *data)
 
static void sdl_poll_mouse (sdl_input_t *sdl)
 
static void sdl_input_poll (void *data)
 
static uint64_t sdl_get_capabilities (void *data)
 
static bool sdl_keyboard_mapping_is_blocked (void *data)
 
static void sdl_keyboard_mapping_set_block (void *data, bool value)
 

Variables

input_driver_t input_sdl
 

Typedef Documentation

◆ sdl_input_t

typedef struct sdl_input sdl_input_t

Function Documentation

◆ sdl_analog_pressed()

static int16_t sdl_analog_pressed ( sdl_input_t sdl,
const struct retro_keybind binds,
unsigned  idx,
unsigned  id 
)
static
Here is the call graph for this function:
Here is the caller graph for this function:

◆ sdl_get_capabilities()

static uint64_t sdl_get_capabilities ( void data)
static

◆ sdl_get_joypad_driver()

static const input_device_driver_t* sdl_get_joypad_driver ( void data)
static

◆ sdl_grab_mouse()

static void sdl_grab_mouse ( void data,
bool  state 
)
static
Here is the call graph for this function:

◆ sdl_input_free()

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

◆ sdl_input_init()

static void* sdl_input_init ( const char *  joypad_driver)
static
Here is the call graph for this function:

◆ sdl_input_poll()

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

◆ sdl_input_state()

static int16_t sdl_input_state ( void data,
rarch_joypad_info_t  joypad_info,
const struct retro_keybind **  binds,
unsigned  port,
unsigned  device,
unsigned  idx,
unsigned  id 
)
static
Here is the call graph for this function:

◆ sdl_joypad_device_state()

static int16_t sdl_joypad_device_state ( sdl_input_t sdl,
rarch_joypad_info_t  joypad_info,
const struct retro_keybind binds,
unsigned  port,
unsigned  id,
enum input_device_type device 
)
static
Here is the call graph for this function:
Here is the caller graph for this function:

◆ sdl_key_pressed()

static bool sdl_key_pressed ( int  key)
static
Here is the caller graph for this function:

◆ sdl_keyboard_mapping_is_blocked()

static bool sdl_keyboard_mapping_is_blocked ( void data)
static

◆ sdl_keyboard_mapping_set_block()

static void sdl_keyboard_mapping_set_block ( void data,
bool  value 
)
static

◆ sdl_lightgun_device_state()

static int16_t sdl_lightgun_device_state ( sdl_input_t sdl,
unsigned  id 
)
static
Here is the caller graph for this function:

◆ sdl_mouse_device_state()

static int16_t sdl_mouse_device_state ( sdl_input_t sdl,
unsigned  id 
)
static
Here is the caller graph for this function:

◆ sdl_pointer_device_state()

static int16_t sdl_pointer_device_state ( sdl_input_t sdl,
unsigned  idx,
unsigned  id,
bool  screen 
)
static
Here is the caller graph for this function:

◆ sdl_poll_mouse()

static void sdl_poll_mouse ( sdl_input_t sdl)
static
Here is the caller graph for this function:

◆ sdl_set_rumble()

static bool sdl_set_rumble ( void data,
unsigned  port,
enum retro_rumble_effect  effect,
uint16_t  strength 
)
static
Here is the call graph for this function:

Variable Documentation

◆ input_sdl

input_driver_t input_sdl
Initial value:
= {
"sdl",
}
static int16_t sdl_input_state(void *data, rarch_joypad_info_t joypad_info, const struct retro_keybind **binds, unsigned port, unsigned device, unsigned idx, unsigned id)
Definition: sdl_input.c:209
static void sdl_keyboard_mapping_set_block(void *data, bool value)
Definition: sdl_input.c:398
static uint64_t sdl_get_capabilities(void *data)
Definition: sdl_input.c:376
static void sdl_grab_mouse(void *data, bool state)
Definition: sdl_input.c:273
static void sdl_input_free(void *data)
Definition: sdl_input.c:250
static bool sdl_set_rumble(void *data, unsigned port, enum retro_rumble_effect effect, uint16_t strength)
Definition: sdl_input.c:289
#define NULL
Pointer to 0.
Definition: gctypes.h:65
static void * sdl_input_init(const char *joypad_driver)
Definition: sdl_input.c:47
static void sdl_input_poll(void *data)
Definition: sdl_input.c:323
static const input_device_driver_t * sdl_get_joypad_driver(void *data)
Definition: sdl_input.c:298
static bool sdl_keyboard_mapping_is_blocked(void *data)
Definition: sdl_input.c:390