mirror of
https://github.com/libretro/RetroArch
synced 2025-02-22 12:40:09 +00:00
Move static inline functions over to input_bind_dialog.c - were
not used elsewhere
This commit is contained in:
parent
55de2803a4
commit
7c63889b26
@ -362,56 +362,6 @@ int16_t input_joypad_analog(const input_device_driver_t *driver,
|
|||||||
bool input_joypad_set_rumble(const input_device_driver_t *driver,
|
bool input_joypad_set_rumble(const input_device_driver_t *driver,
|
||||||
unsigned port, enum retro_rumble_effect effect, uint16_t strength);
|
unsigned port, enum retro_rumble_effect effect, uint16_t strength);
|
||||||
|
|
||||||
/**
|
|
||||||
* input_joypad_axis_raw:
|
|
||||||
* @drv : Input device driver handle.
|
|
||||||
* @port : Joystick number.
|
|
||||||
* @axis : Identifier of axis.
|
|
||||||
*
|
|
||||||
* Checks if axis (@axis) was being pressed by user
|
|
||||||
* with joystick number @port.
|
|
||||||
*
|
|
||||||
* Returns: true (1) if axis was pressed, otherwise
|
|
||||||
* false (0).
|
|
||||||
**/
|
|
||||||
static INLINE int16_t input_joypad_axis_raw(
|
|
||||||
const input_device_driver_t *drv,
|
|
||||||
unsigned port, unsigned axis)
|
|
||||||
{
|
|
||||||
if (!drv)
|
|
||||||
return 0;
|
|
||||||
return drv->axis(port, AXIS_POS(axis)) +
|
|
||||||
drv->axis(port, AXIS_NEG(axis));
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* input_joypad_button_raw:
|
|
||||||
* @drv : Input device driver handle.
|
|
||||||
* @port : Joystick number.
|
|
||||||
* @button : Identifier of key.
|
|
||||||
*
|
|
||||||
* Checks if key (@button) was being pressed by user
|
|
||||||
* with joystick number @port.
|
|
||||||
*
|
|
||||||
* Returns: true (1) if key was pressed, otherwise
|
|
||||||
* false (0).
|
|
||||||
**/
|
|
||||||
static INLINE bool input_joypad_button_raw(const input_device_driver_t *drv,
|
|
||||||
unsigned port, unsigned button)
|
|
||||||
{
|
|
||||||
if (!drv)
|
|
||||||
return false;
|
|
||||||
return drv && drv->button(port, button);
|
|
||||||
}
|
|
||||||
|
|
||||||
static INLINE bool input_joypad_hat_raw(const input_device_driver_t *drv,
|
|
||||||
unsigned port, unsigned hat_dir, unsigned hat)
|
|
||||||
{
|
|
||||||
if (!drv)
|
|
||||||
return false;
|
|
||||||
return drv->button(port, HAT_MAP(hat, hat_dir));
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* input_pad_connect:
|
* input_pad_connect:
|
||||||
* @port : Joystick number.
|
* @port : Joystick number.
|
||||||
|
@ -69,6 +69,33 @@ struct menu_bind_state
|
|||||||
static unsigned menu_bind_port = 0;
|
static unsigned menu_bind_port = 0;
|
||||||
static struct menu_bind_state menu_input_binds = {0};
|
static struct menu_bind_state menu_input_binds = {0};
|
||||||
|
|
||||||
|
static bool input_joypad_button_raw(const input_device_driver_t *drv,
|
||||||
|
unsigned port, unsigned button)
|
||||||
|
{
|
||||||
|
if (!drv)
|
||||||
|
return false;
|
||||||
|
return drv && drv->button(port, button);
|
||||||
|
}
|
||||||
|
|
||||||
|
static int16_t input_joypad_axis_raw(
|
||||||
|
const input_device_driver_t *drv,
|
||||||
|
unsigned port, unsigned axis)
|
||||||
|
{
|
||||||
|
if (!drv)
|
||||||
|
return 0;
|
||||||
|
return drv->axis(port, AXIS_POS(axis)) +
|
||||||
|
drv->axis(port, AXIS_NEG(axis));
|
||||||
|
}
|
||||||
|
|
||||||
|
static bool input_joypad_hat_raw(const input_device_driver_t *drv,
|
||||||
|
unsigned port, unsigned hat_dir, unsigned hat)
|
||||||
|
{
|
||||||
|
if (!drv)
|
||||||
|
return false;
|
||||||
|
return drv->button(port, HAT_MAP(hat, hat_dir));
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
static bool menu_input_key_bind_custom_bind_keyboard_cb(
|
static bool menu_input_key_bind_custom_bind_keyboard_cb(
|
||||||
void *data, unsigned code)
|
void *data, unsigned code)
|
||||||
{
|
{
|
||||||
|
Loading…
x
Reference in New Issue
Block a user