mirror of
https://github.com/libretro/RetroArch
synced 2025-03-22 07:21:15 +00:00
Start renaming 'Joypad' to 'Input Device'
This commit is contained in:
parent
0057510caf
commit
6db7115484
@ -91,20 +91,20 @@ static bool linuxraw_joypad_init_pad(const char *path, struct linuxraw_joypad *p
|
|||||||
{
|
{
|
||||||
if (ioctl(pad->fd, JSIOCGNAME(sizeof(settings->input.device_names[0])), pad->ident) >= 0)
|
if (ioctl(pad->fd, JSIOCGNAME(sizeof(settings->input.device_names[0])), pad->ident) >= 0)
|
||||||
{
|
{
|
||||||
RARCH_LOG("[Joypad]: Found pad: %s on %s.\n", pad->ident, path);
|
RARCH_LOG("[Device]: Found pad: %s on %s.\n", pad->ident, path);
|
||||||
|
|
||||||
#ifndef IS_JOYCONFIG
|
#ifndef IS_JOYCONFIG
|
||||||
if (g_hotplug)
|
if (g_hotplug)
|
||||||
{
|
{
|
||||||
char msg[512];
|
char msg[512];
|
||||||
snprintf(msg, sizeof(msg), "Joypad #%u (%s) connected.", (unsigned)(pad - linuxraw_pads), pad->ident);
|
snprintf(msg, sizeof(msg), "Device #%u (%s) connected.", (unsigned)(pad - linuxraw_pads), pad->ident);
|
||||||
rarch_main_msg_queue_push(msg, 0, 60, false);
|
rarch_main_msg_queue_push(msg, 0, 60, false);
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
else
|
else
|
||||||
RARCH_ERR("[Joypad]: Didn't find ident of %s.\n", path);
|
RARCH_ERR("[Device]: Didn't find ident of %s.\n", path);
|
||||||
|
|
||||||
struct epoll_event event;
|
struct epoll_event event;
|
||||||
event.events = EPOLLIN;
|
event.events = EPOLLIN;
|
||||||
@ -113,7 +113,7 @@ static bool linuxraw_joypad_init_pad(const char *path, struct linuxraw_joypad *p
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
RARCH_ERR("[Joypad]: Failed to open pad %s (error: %s).\n", path, strerror(errno));
|
RARCH_ERR("[Device]: Failed to open pad %s (error: %s).\n", path, strerror(errno));
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -160,7 +160,7 @@ static void handle_plugged_pad(void)
|
|||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
RARCH_LOG("[Joypad]: Device %s disconnected.\n", linuxraw_pads[idx].ident);
|
RARCH_LOG("[Device]: Device %s disconnected.\n", linuxraw_pads[idx].ident);
|
||||||
close(linuxraw_pads[idx].fd);
|
close(linuxraw_pads[idx].fd);
|
||||||
linuxraw_pads[idx].buttons = 0;
|
linuxraw_pads[idx].buttons = 0;
|
||||||
memset(linuxraw_pads[idx].axes, 0, sizeof(linuxraw_pads[idx].axes));
|
memset(linuxraw_pads[idx].axes, 0, sizeof(linuxraw_pads[idx].axes));
|
||||||
|
@ -145,13 +145,13 @@ static void sdl_pad_connect(unsigned id)
|
|||||||
|
|
||||||
input_config_autoconfigure_joypad(¶ms);
|
input_config_autoconfigure_joypad(¶ms);
|
||||||
|
|
||||||
RARCH_LOG("[SDL]: Joypad #%u (%04x:%04x) connected: %s.\n", id, vendor,
|
RARCH_LOG("[SDL]: Device #%u (%04x:%04x) connected: %s.\n", id, vendor,
|
||||||
product, sdl_pad_name(id));
|
product, sdl_pad_name(id));
|
||||||
|
|
||||||
#ifdef HAVE_SDL2
|
#ifdef HAVE_SDL2
|
||||||
|
|
||||||
if (pad->controller)
|
if (pad->controller)
|
||||||
RARCH_LOG("[SDL]: Joypad #%u supports game controller api.\n", id);
|
RARCH_LOG("[SDL]: Device #%u supports game controller api.\n", id);
|
||||||
|
|
||||||
pad->haptic = g_has_haptic ? SDL_HapticOpenFromJoystick(pad->joypad) : NULL;
|
pad->haptic = g_has_haptic ? SDL_HapticOpenFromJoystick(pad->joypad) : NULL;
|
||||||
|
|
||||||
@ -172,7 +172,7 @@ static void sdl_pad_connect(unsigned id)
|
|||||||
if (SDL_HapticEffectSupported(pad->haptic, &efx) == SDL_FALSE)
|
if (SDL_HapticEffectSupported(pad->haptic, &efx) == SDL_FALSE)
|
||||||
{
|
{
|
||||||
pad->rumble_effect = -2;
|
pad->rumble_effect = -2;
|
||||||
RARCH_WARN("[SDL]: Joypad #%u does not support rumble.\n", id);
|
RARCH_WARN("[SDL]: Device #%u does not support rumble.\n", id);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
@ -184,10 +184,10 @@ static void sdl_pad_connect(unsigned id)
|
|||||||
#ifdef HAVE_SDL2
|
#ifdef HAVE_SDL2
|
||||||
pad->num_balls = SDL_JoystickNumBalls(pad->joypad);
|
pad->num_balls = SDL_JoystickNumBalls(pad->joypad);
|
||||||
|
|
||||||
RARCH_LOG("[SDL]: Joypad #%u has: %u axes, %u buttons, %u hats and %u trackballs.\n",
|
RARCH_LOG("[SDL]: Device #%u has: %u axes, %u buttons, %u hats and %u trackballs.\n",
|
||||||
id, pad->num_axes, pad->num_buttons, pad->num_hats, pad->num_balls);
|
id, pad->num_axes, pad->num_buttons, pad->num_hats, pad->num_balls);
|
||||||
#else
|
#else
|
||||||
RARCH_LOG("[SDL]: Joypad #%u has: %u axes, %u buttons, %u hats.\n",
|
RARCH_LOG("[SDL]: Device #%u has: %u axes, %u buttons, %u hats.\n",
|
||||||
id, pad->num_axes, pad->num_buttons, pad->num_hats);
|
id, pad->num_axes, pad->num_buttons, pad->num_hats);
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
@ -26,7 +26,7 @@
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* input_joypad_name:
|
* input_joypad_name:
|
||||||
* @drv : Joypad driver handle.
|
* @drv : Input device driver handle.
|
||||||
* @port : Joystick number.
|
* @port : Joystick number.
|
||||||
*
|
*
|
||||||
* Gets name of the joystick (@port).
|
* Gets name of the joystick (@port).
|
||||||
@ -43,7 +43,7 @@ const char *input_joypad_name(const rarch_joypad_driver_t *drv,
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* input_joypad_set_rumble:
|
* input_joypad_set_rumble:
|
||||||
* @drv : Joypad driver handle.
|
* @drv : Input device driver handle.
|
||||||
* @port : User number.
|
* @port : User number.
|
||||||
* @effect : Rumble effect to set.
|
* @effect : Rumble effect to set.
|
||||||
* @strength : Strength of rumble effect.
|
* @strength : Strength of rumble effect.
|
||||||
@ -69,7 +69,7 @@ bool input_joypad_set_rumble(const rarch_joypad_driver_t *drv,
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* input_joypad_is_pressed:
|
* input_joypad_is_pressed:
|
||||||
* @drv : Joypad driver handle.
|
* @drv : Input device driver handle.
|
||||||
* @port : User number.
|
* @port : User number.
|
||||||
* @binds : Binds of user.
|
* @binds : Binds of user.
|
||||||
* @key : Identifier of key.
|
* @key : Identifier of key.
|
||||||
@ -120,7 +120,7 @@ bool input_joypad_pressed(
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* input_joypad_analog:
|
* input_joypad_analog:
|
||||||
* @drv : Joypad driver handle.
|
* @drv : Input device driver handle.
|
||||||
* @port : User number.
|
* @port : User number.
|
||||||
* @idx : Analog key index.
|
* @idx : Analog key index.
|
||||||
* E.g.:
|
* E.g.:
|
||||||
@ -198,7 +198,7 @@ int16_t input_joypad_analog(const rarch_joypad_driver_t *drv,
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* input_joypad_axis_raw:
|
* input_joypad_axis_raw:
|
||||||
* @drv : Joypad driver handle.
|
* @drv : Input device driver handle.
|
||||||
* @port : Joystick number.
|
* @port : Joystick number.
|
||||||
* @axis : Identifier of axis.
|
* @axis : Identifier of axis.
|
||||||
*
|
*
|
||||||
@ -219,7 +219,7 @@ int16_t input_joypad_axis_raw(const rarch_joypad_driver_t *drv,
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* input_joypad_button_raw:
|
* input_joypad_button_raw:
|
||||||
* @drv : Joypad driver handle.
|
* @drv : Input device driver handle.
|
||||||
* @port : Joystick number.
|
* @port : Joystick number.
|
||||||
* @button : Identifier of key.
|
* @button : Identifier of key.
|
||||||
*
|
*
|
||||||
|
@ -70,7 +70,7 @@ static INLINE void input_conv_analog_id_to_bind_id(unsigned idx, unsigned ident,
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* input_joypad_pressed:
|
* input_joypad_pressed:
|
||||||
* @drv : Joypad driver handle.
|
* @drv : Input device driver handle.
|
||||||
* @port : User number.
|
* @port : User number.
|
||||||
* @binds : Binds of user.
|
* @binds : Binds of user.
|
||||||
* @key : Identifier of key.
|
* @key : Identifier of key.
|
||||||
@ -86,7 +86,7 @@ bool input_joypad_pressed(const rarch_joypad_driver_t *driver,
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* input_joypad_analog:
|
* input_joypad_analog:
|
||||||
* @drv : Joypad driver handle.
|
* @drv : Input device driver handle.
|
||||||
* @port : User number.
|
* @port : User number.
|
||||||
* @idx : Analog key index.
|
* @idx : Analog key index.
|
||||||
* E.g.:
|
* E.g.:
|
||||||
@ -109,7 +109,7 @@ int16_t input_joypad_analog(const rarch_joypad_driver_t *driver,
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* input_joypad_set_rumble:
|
* input_joypad_set_rumble:
|
||||||
* @drv : Joypad driver handle.
|
* @drv : Input device driver handle.
|
||||||
* @port : User number.
|
* @port : User number.
|
||||||
* @effect : Rumble effect to set.
|
* @effect : Rumble effect to set.
|
||||||
* @strength : Strength of rumble effect.
|
* @strength : Strength of rumble effect.
|
||||||
@ -123,7 +123,7 @@ bool input_joypad_set_rumble(const rarch_joypad_driver_t *driver,
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* input_joypad_axis_raw:
|
* input_joypad_axis_raw:
|
||||||
* @drv : Joypad driver handle.
|
* @drv : Input device driver handle.
|
||||||
* @port : Joystick number.
|
* @port : Joystick number.
|
||||||
* @axis : Identifier of axis.
|
* @axis : Identifier of axis.
|
||||||
*
|
*
|
||||||
@ -138,7 +138,7 @@ int16_t input_joypad_axis_raw(const rarch_joypad_driver_t *driver,
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* input_joypad_button_raw:
|
* input_joypad_button_raw:
|
||||||
* @drv : Joypad driver handle.
|
* @drv : Input device driver handle.
|
||||||
* @port : Joystick number.
|
* @port : Joystick number.
|
||||||
* @button : Identifier of key.
|
* @button : Identifier of key.
|
||||||
*
|
*
|
||||||
@ -156,7 +156,7 @@ bool input_joypad_hat_raw(const rarch_joypad_driver_t *driver,
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* input_joypad_name:
|
* input_joypad_name:
|
||||||
* @drv : Joypad driver handle.
|
* @drv : Input device driver handle.
|
||||||
* @port : Joystick number.
|
* @port : Joystick number.
|
||||||
*
|
*
|
||||||
* Gets name of the joystick (@port).
|
* Gets name of the joystick (@port).
|
||||||
|
@ -329,7 +329,7 @@
|
|||||||
# Input driver. Depending on video driver, it might force a different input driver.
|
# Input driver. Depending on video driver, it might force a different input driver.
|
||||||
# input_driver = sdl
|
# input_driver = sdl
|
||||||
|
|
||||||
# Joypad driver. (Valid: linuxraw, sdl, dinput)
|
# Input device driver. (Valid: linuxraw, sdl, dinput)
|
||||||
# input_joypad_driver =
|
# input_joypad_driver =
|
||||||
|
|
||||||
# Path to input remapping file.
|
# Path to input remapping file.
|
||||||
@ -447,7 +447,7 @@
|
|||||||
# input_player7_joypad_index = 6
|
# input_player7_joypad_index = 6
|
||||||
# input_player8_joypad_index = 7
|
# input_player8_joypad_index = 7
|
||||||
|
|
||||||
# Joypad buttons.
|
# Input device buttons.
|
||||||
# Figure these out by using RetroArch-Phoenix or retroarch-joyconfig.
|
# Figure these out by using RetroArch-Phoenix or retroarch-joyconfig.
|
||||||
# You can use joypad hats with hnxx, where n is the hat, and xx is a string representing direction.
|
# You can use joypad hats with hnxx, where n is the hat, and xx is a string representing direction.
|
||||||
# E.g. "h0up"
|
# E.g. "h0up"
|
||||||
|
Loading…
x
Reference in New Issue
Block a user