mirror of
https://github.com/libretro/RetroArch
synced 2025-02-28 12:40:23 +00:00
Rename autoconfig functions
This commit is contained in:
parent
a692b5953f
commit
e689d55414
@ -902,7 +902,7 @@ static void handle_hotplug(android_input_data_t *android_data,
|
|||||||
settings->input.vid[*port] = params.vid;
|
settings->input.vid[*port] = params.vid;
|
||||||
|
|
||||||
strlcpy(params.driver, android_joypad.ident, sizeof(params.driver));
|
strlcpy(params.driver, android_joypad.ident, sizeof(params.driver));
|
||||||
input_config_autoconfigure_joypad(¶ms);
|
input_autoconfigure_joypad(¶ms);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!string_is_empty(name_buf))
|
if (!string_is_empty(name_buf))
|
||||||
|
@ -212,12 +212,15 @@ static void qnx_input_autodetect_gamepad(qnx_input_t *qnx,
|
|||||||
strlcpy(settings->input.device_names[port],
|
strlcpy(settings->input.device_names[port],
|
||||||
name_buf, sizeof(settings->input.device_names[port]));
|
name_buf, sizeof(settings->input.device_names[port]));
|
||||||
|
|
||||||
params.idx = port;
|
|
||||||
strlcpy(params.name, name_buf, sizeof(params.name));
|
strlcpy(params.name, name_buf, sizeof(params.name));
|
||||||
|
|
||||||
|
params.idx = port;
|
||||||
params.vid = *controller->vid;
|
params.vid = *controller->vid;
|
||||||
params.pid = *controller->pid;
|
params.pid = *controller->pid;
|
||||||
|
|
||||||
strlcpy(params.driver, qnx->joypad->ident, sizeof(params.driver));
|
strlcpy(params.driver, qnx->joypad->ident, sizeof(params.driver));
|
||||||
input_config_autoconfigure_joypad(¶ms);
|
|
||||||
|
input_autoconfigure_joypad(¶ms);
|
||||||
|
|
||||||
controller->port = port;
|
controller->port = port;
|
||||||
qnx->port_device[port] = controller;
|
qnx->port_device[port] = controller;
|
||||||
|
@ -247,7 +247,7 @@ static void iohidmanager_hid_device_remove(void *data,
|
|||||||
|
|
||||||
if (hid && adapter && (adapter->slot < MAX_USERS))
|
if (hid && adapter && (adapter->slot < MAX_USERS))
|
||||||
{
|
{
|
||||||
input_config_autoconfigure_disconnect(adapter->slot, adapter->name);
|
input_autoconfigure_disconnect(adapter->slot, adapter->name);
|
||||||
|
|
||||||
hid->buttons[adapter->slot] = 0;
|
hid->buttons[adapter->slot] = 0;
|
||||||
memset(hid->axes[adapter->slot], 0, sizeof(hid->axes));
|
memset(hid->axes[adapter->slot], 0, sizeof(hid->axes));
|
||||||
@ -309,7 +309,8 @@ static void iohidmanager_hid_device_add_autodetect(unsigned idx,
|
|||||||
strlcpy(params.name, device_name, sizeof(params.name));
|
strlcpy(params.name, device_name, sizeof(params.name));
|
||||||
strlcpy(params.driver, driver_name, sizeof(params.driver));
|
strlcpy(params.driver, driver_name, sizeof(params.driver));
|
||||||
|
|
||||||
input_config_autoconfigure_joypad(¶ms);
|
input_autoconfigure_joypad(¶ms);
|
||||||
|
|
||||||
RARCH_LOG("Port %d: %s.\n", idx, device_name);
|
RARCH_LOG("Port %d: %s.\n", idx, device_name);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -150,7 +150,7 @@ static void libusb_hid_device_add_autodetect(unsigned idx,
|
|||||||
strlcpy(params.name, device_name, sizeof(params.name));
|
strlcpy(params.name, device_name, sizeof(params.name));
|
||||||
strlcpy(params.driver, driver_name, sizeof(params.driver));
|
strlcpy(params.driver, driver_name, sizeof(params.driver));
|
||||||
|
|
||||||
input_config_autoconfigure_joypad(¶ms);
|
input_autoconfigure_joypad(¶ms);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void libusb_get_description(struct libusb_device *device,
|
static void libusb_get_description(struct libusb_device *device,
|
||||||
@ -367,9 +367,9 @@ static int remove_adapter(void *data, struct libusb_device *dev)
|
|||||||
if (adapter->next->device == dev)
|
if (adapter->next->device == dev)
|
||||||
{
|
{
|
||||||
struct libusb_adapter *new_next = NULL;
|
struct libusb_adapter *new_next = NULL;
|
||||||
const char *name = (const char*)adapter->next->name;
|
const char *name = (const char*)adapter->next->name;
|
||||||
|
|
||||||
input_config_autoconfigure_disconnect(adapter->slot, name);
|
input_autoconfigure_disconnect(adapter->slot, name);
|
||||||
|
|
||||||
adapter->next->quitting = true;
|
adapter->next->quitting = true;
|
||||||
sthread_join(adapter->next->thread);
|
sthread_join(adapter->next->thread);
|
||||||
|
@ -152,7 +152,7 @@ static void wiiusb_hid_device_add_autodetect(unsigned idx,
|
|||||||
strlcpy(settings->input.device_names[idx], device_name,
|
strlcpy(settings->input.device_names[idx], device_name,
|
||||||
sizeof(settings->input.device_names[idx]));
|
sizeof(settings->input.device_names[idx]));
|
||||||
|
|
||||||
input_config_autoconfigure_joypad(¶ms);
|
input_autoconfigure_joypad(¶ms);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void wiiusb_get_description(usb_device_entry *device,
|
static void wiiusb_get_description(usb_device_entry *device,
|
||||||
@ -209,15 +209,17 @@ static const char *wiiusb_hid_joypad_name(void *data, unsigned pad)
|
|||||||
|
|
||||||
static int32_t wiiusb_hid_release_adapter(struct wiiusb_adapter *adapter)
|
static int32_t wiiusb_hid_release_adapter(struct wiiusb_adapter *adapter)
|
||||||
{
|
{
|
||||||
wiiusb_hid_t *hid;
|
wiiusb_hid_t *hid = NULL;
|
||||||
const char *name;
|
const char *name = NULL;
|
||||||
|
|
||||||
if (!adapter)
|
if (!adapter)
|
||||||
return -1;
|
return -1;
|
||||||
|
|
||||||
hid = adapter->hid;
|
hid = adapter->hid;
|
||||||
name = wiiusb_hid_joypad_name(hid, adapter->slot);
|
name = wiiusb_hid_joypad_name(hid, adapter->slot);
|
||||||
input_config_autoconfigure_disconnect(adapter->slot, name);
|
|
||||||
|
input_autoconfigure_disconnect(adapter->slot, name);
|
||||||
|
|
||||||
pad_connection_pad_deinit(&hid->connections[adapter->slot], adapter->slot);
|
pad_connection_pad_deinit(&hid->connections[adapter->slot], adapter->slot);
|
||||||
|
|
||||||
free(adapter->send_control_buffer);
|
free(adapter->send_control_buffer);
|
||||||
|
@ -55,7 +55,8 @@ static void ctr_joypad_autodetect_add(unsigned autoconf_pad)
|
|||||||
params.idx = autoconf_pad;
|
params.idx = autoconf_pad;
|
||||||
strlcpy(params.name, ctr_joypad_name(autoconf_pad), sizeof(params.name));
|
strlcpy(params.name, ctr_joypad_name(autoconf_pad), sizeof(params.name));
|
||||||
strlcpy(params.driver, ctr_joypad.ident, sizeof(params.driver));
|
strlcpy(params.driver, ctr_joypad.ident, sizeof(params.driver));
|
||||||
input_config_autoconfigure_joypad(¶ms);
|
|
||||||
|
input_autoconfigure_joypad(¶ms);
|
||||||
}
|
}
|
||||||
|
|
||||||
static bool ctr_joypad_init(void *data)
|
static bool ctr_joypad_init(void *data)
|
||||||
|
@ -276,7 +276,9 @@ static BOOL CALLBACK enum_joypad_cb(const DIDEVICEINSTANCE *inst, void *p)
|
|||||||
strlcpy(params.driver, dinput_joypad.ident, sizeof(params.driver));
|
strlcpy(params.driver, dinput_joypad.ident, sizeof(params.driver));
|
||||||
params.vid = dinput_joypad_vid(g_joypad_cnt);
|
params.vid = dinput_joypad_vid(g_joypad_cnt);
|
||||||
params.pid = dinput_joypad_pid(g_joypad_cnt);
|
params.pid = dinput_joypad_pid(g_joypad_cnt);
|
||||||
input_config_autoconfigure_joypad(¶ms);
|
|
||||||
|
input_autoconfigure_joypad(¶ms);
|
||||||
|
|
||||||
settings->input.pid[g_joypad_cnt] = params.pid;
|
settings->input.pid[g_joypad_cnt] = params.pid;
|
||||||
settings->input.vid[g_joypad_cnt] = params.vid;
|
settings->input.vid[g_joypad_cnt] = params.vid;
|
||||||
}
|
}
|
||||||
|
@ -158,7 +158,7 @@ static void handle_hotplug(unsigned port, uint32_t ptype)
|
|||||||
params.idx = port;
|
params.idx = port;
|
||||||
strlcpy(params.name, gx_joypad_name(port), sizeof(params.name));
|
strlcpy(params.name, gx_joypad_name(port), sizeof(params.name));
|
||||||
strlcpy(params.driver, gx_joypad.ident, sizeof(params.driver));
|
strlcpy(params.driver, gx_joypad.ident, sizeof(params.driver));
|
||||||
input_config_autoconfigure_joypad(¶ms);
|
input_autoconfigure_joypad(¶ms);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -164,7 +164,7 @@ static void handle_plugged_pad(void)
|
|||||||
if (linuxraw_pads[idx].fd >= 0)
|
if (linuxraw_pads[idx].fd >= 0)
|
||||||
{
|
{
|
||||||
if (linuxraw_hotplug)
|
if (linuxraw_hotplug)
|
||||||
input_config_autoconfigure_disconnect(idx, linuxraw_pads[idx].ident);
|
input_autoconfigure_disconnect(idx, linuxraw_pads[idx].ident);
|
||||||
|
|
||||||
close(linuxraw_pads[idx].fd);
|
close(linuxraw_pads[idx].fd);
|
||||||
linuxraw_pads[idx].buttons = 0;
|
linuxraw_pads[idx].buttons = 0;
|
||||||
@ -174,7 +174,8 @@ static void handle_plugged_pad(void)
|
|||||||
|
|
||||||
/* TODO - implement VID/PID? */
|
/* TODO - implement VID/PID? */
|
||||||
params.idx = idx;
|
params.idx = idx;
|
||||||
input_config_autoconfigure_joypad(¶ms);
|
|
||||||
|
input_autoconfigure_joypad(¶ms);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
/* Sometimes, device will be created before access to it is established. */
|
/* Sometimes, device will be created before access to it is established. */
|
||||||
@ -193,7 +194,8 @@ static void handle_plugged_pad(void)
|
|||||||
strlcpy(params.name, linuxraw_pads[idx].ident, sizeof(params.name));
|
strlcpy(params.name, linuxraw_pads[idx].ident, sizeof(params.name));
|
||||||
strlcpy(params.driver, linuxraw_joypad.ident, sizeof(params.driver));
|
strlcpy(params.driver, linuxraw_joypad.ident, sizeof(params.driver));
|
||||||
/* TODO - implement VID/PID? */
|
/* TODO - implement VID/PID? */
|
||||||
input_config_autoconfigure_joypad(¶ms);
|
|
||||||
|
input_autoconfigure_joypad(¶ms);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -252,11 +254,11 @@ static bool linuxraw_joypad_init(void *data)
|
|||||||
strlcpy(params.driver, "linuxraw", sizeof(params.driver));
|
strlcpy(params.driver, "linuxraw", sizeof(params.driver));
|
||||||
|
|
||||||
/* TODO - implement VID/PID? */
|
/* TODO - implement VID/PID? */
|
||||||
input_config_autoconfigure_joypad(¶ms);
|
input_autoconfigure_joypad(¶ms);
|
||||||
linuxraw_poll_pad(pad);
|
linuxraw_poll_pad(pad);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
input_config_autoconfigure_joypad(¶ms);
|
input_autoconfigure_joypad(¶ms);
|
||||||
}
|
}
|
||||||
|
|
||||||
linuxraw_inotify = inotify_init();
|
linuxraw_inotify = inotify_init();
|
||||||
|
@ -306,7 +306,8 @@ static bool parport_joypad_init(void *data)
|
|||||||
parport_free_pad(pad);
|
parport_free_pad(pad);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
input_config_autoconfigure_joypad(¶ms);
|
|
||||||
|
input_autoconfigure_joypad(¶ms);
|
||||||
}
|
}
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
|
@ -53,7 +53,8 @@ static void ps3_joypad_autodetect_add(unsigned autoconf_pad)
|
|||||||
params.idx = autoconf_pad;
|
params.idx = autoconf_pad;
|
||||||
strlcpy(params.name, ps3_joypad_name(autoconf_pad), sizeof(params.name));
|
strlcpy(params.name, ps3_joypad_name(autoconf_pad), sizeof(params.name));
|
||||||
strlcpy(params.driver, ps3_joypad.ident, sizeof(params.driver));
|
strlcpy(params.driver, ps3_joypad.ident, sizeof(params.driver));
|
||||||
input_config_autoconfigure_joypad(¶ms);
|
|
||||||
|
input_autoconfigure_joypad(¶ms);
|
||||||
}
|
}
|
||||||
|
|
||||||
static bool ps3_joypad_init(void *data)
|
static bool ps3_joypad_init(void *data)
|
||||||
@ -138,7 +139,7 @@ static void ps3_joypad_poll(void)
|
|||||||
{
|
{
|
||||||
if ( (pad_info.port_status[port] & CELL_PAD_STATUS_CONNECTED) == 0 )
|
if ( (pad_info.port_status[port] & CELL_PAD_STATUS_CONNECTED) == 0 )
|
||||||
{
|
{
|
||||||
input_config_autoconfigure_disconnect(port, ps3_joypad.ident);
|
input_autoconfigure_disconnect(port, ps3_joypad.ident);
|
||||||
pads_connected[port] = 0;
|
pads_connected[port] = 0;
|
||||||
}
|
}
|
||||||
else if ((pad_info.port_status[port] & CELL_PAD_STATUS_CONNECTED) > 0 )
|
else if ((pad_info.port_status[port] & CELL_PAD_STATUS_CONNECTED) > 0 )
|
||||||
|
@ -83,7 +83,7 @@ static void psp_joypad_autodetect_add(unsigned autoconf_pad)
|
|||||||
params.idx = autoconf_pad;
|
params.idx = autoconf_pad;
|
||||||
strlcpy(params.name, psp_joypad_name(autoconf_pad), sizeof(params.name));
|
strlcpy(params.name, psp_joypad_name(autoconf_pad), sizeof(params.name));
|
||||||
strlcpy(params.driver, psp_joypad.ident, sizeof(params.driver));
|
strlcpy(params.driver, psp_joypad.ident, sizeof(params.driver));
|
||||||
input_config_autoconfigure_joypad(¶ms);
|
input_autoconfigure_joypad(¶ms);
|
||||||
}
|
}
|
||||||
|
|
||||||
static bool psp_joypad_init(void *data)
|
static bool psp_joypad_init(void *data)
|
||||||
@ -190,7 +190,7 @@ static void psp_joypad_poll(void)
|
|||||||
if (old_ctrl_info.port[player + 1] != SCE_CTRL_TYPE_UNPAIRED &&
|
if (old_ctrl_info.port[player + 1] != SCE_CTRL_TYPE_UNPAIRED &&
|
||||||
curr_ctrl_info.port[player + 1] == SCE_CTRL_TYPE_UNPAIRED) {
|
curr_ctrl_info.port[player + 1] == SCE_CTRL_TYPE_UNPAIRED) {
|
||||||
memset(&actuators[player], 0, sizeof(SceCtrlActuator));
|
memset(&actuators[player], 0, sizeof(SceCtrlActuator));
|
||||||
input_config_autoconfigure_disconnect(player, psp_joypad.ident);
|
input_autoconfigure_disconnect(player, psp_joypad.ident);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (old_ctrl_info.port[player + 1] == SCE_CTRL_TYPE_UNPAIRED &&
|
if (old_ctrl_info.port[player + 1] == SCE_CTRL_TYPE_UNPAIRED &&
|
||||||
|
@ -41,9 +41,10 @@ static bool qnx_joypad_init(void *data)
|
|||||||
|
|
||||||
/* TODO - implement VID/PID? */
|
/* TODO - implement VID/PID? */
|
||||||
params.idx = autoconf_pad;
|
params.idx = autoconf_pad;
|
||||||
strlcpy(params.name, qnx_joypad_name(autoconf_pad), sizeof(params.name));
|
strlcpy(params.name, qnx_joypad_name(autoconf_pad), sizeof(params.name));
|
||||||
strlcpy(params.driver, qnx_joypad.ident, sizeof(params.driver));
|
strlcpy(params.driver, qnx_joypad.ident, sizeof(params.driver));
|
||||||
input_config_autoconfigure_joypad(¶ms);
|
|
||||||
|
input_autoconfigure_joypad(¶ms);
|
||||||
}
|
}
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
|
@ -150,7 +150,7 @@ static void sdl_pad_connect(unsigned id)
|
|||||||
params.pid = product;
|
params.pid = product;
|
||||||
strlcpy(params.driver, sdl_joypad.ident, sizeof(params.driver));
|
strlcpy(params.driver, sdl_joypad.ident, sizeof(params.driver));
|
||||||
|
|
||||||
input_config_autoconfigure_joypad(¶ms);
|
input_autoconfigure_joypad(¶ms);
|
||||||
|
|
||||||
RARCH_LOG("[SDL]: Device #%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));
|
||||||
@ -209,14 +209,14 @@ static void sdl_pad_disconnect(unsigned id)
|
|||||||
if (sdl_pads[id].controller)
|
if (sdl_pads[id].controller)
|
||||||
{
|
{
|
||||||
SDL_GameControllerClose(sdl_pads[id].controller);
|
SDL_GameControllerClose(sdl_pads[id].controller);
|
||||||
input_config_autoconfigure_disconnect(id, sdl_joypad.ident);
|
input_autoconfigure_disconnect(id, sdl_joypad.ident);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
#endif
|
#endif
|
||||||
if (sdl_pads[id].joypad)
|
if (sdl_pads[id].joypad)
|
||||||
{
|
{
|
||||||
SDL_JoystickClose(sdl_pads[id].joypad);
|
SDL_JoystickClose(sdl_pads[id].joypad);
|
||||||
input_config_autoconfigure_disconnect(id, sdl_joypad.ident);
|
input_autoconfigure_disconnect(id, sdl_joypad.ident);
|
||||||
}
|
}
|
||||||
|
|
||||||
settings->input.device_names[id][0] = '\0';
|
settings->input.device_names[id][0] = '\0';
|
||||||
|
@ -290,7 +290,7 @@ static int udev_add_pad(struct udev_device *dev, unsigned p, int fd, const char
|
|||||||
settings->input.vid[p] = params.vid;
|
settings->input.vid[p] = params.vid;
|
||||||
strlcpy(settings->input.device_names[p], params.name, sizeof(settings->input.device_names[p]));
|
strlcpy(settings->input.device_names[p], params.name, sizeof(settings->input.device_names[p]));
|
||||||
strlcpy(params.driver, udev_joypad.ident, sizeof(params.driver));
|
strlcpy(params.driver, udev_joypad.ident, sizeof(params.driver));
|
||||||
input_config_autoconfigure_joypad(¶ms);
|
input_autoconfigure_joypad(¶ms);
|
||||||
|
|
||||||
ret = 1;
|
ret = 1;
|
||||||
}
|
}
|
||||||
@ -387,7 +387,7 @@ static void udev_joypad_remove_device(const char *path)
|
|||||||
{
|
{
|
||||||
if (udev_pads[i].path && string_is_equal(udev_pads[i].path, path))
|
if (udev_pads[i].path && string_is_equal(udev_pads[i].path, path))
|
||||||
{
|
{
|
||||||
input_config_autoconfigure_disconnect(i, udev_pads[i].ident);
|
input_autoconfigure_disconnect(i, udev_pads[i].ident);
|
||||||
udev_free_pad(i);
|
udev_free_pad(i);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
@ -62,7 +62,8 @@ static void wiiu_joypad_autodetect_add(unsigned autoconf_pad)
|
|||||||
params.idx = autoconf_pad;
|
params.idx = autoconf_pad;
|
||||||
strlcpy(params.name, wiiu_joypad_name(autoconf_pad), sizeof(params.name));
|
strlcpy(params.name, wiiu_joypad_name(autoconf_pad), sizeof(params.name));
|
||||||
strlcpy(params.driver, wiiu_joypad.ident, sizeof(params.driver));
|
strlcpy(params.driver, wiiu_joypad.ident, sizeof(params.driver));
|
||||||
input_config_autoconfigure_joypad(¶ms);
|
|
||||||
|
input_autoconfigure_joypad(¶ms);
|
||||||
}
|
}
|
||||||
|
|
||||||
static bool wiiu_joypad_button(unsigned port_num, uint16_t key)
|
static bool wiiu_joypad_button(unsigned port_num, uint16_t key)
|
||||||
|
@ -55,7 +55,7 @@ static void xdk_joypad_autodetect_add(unsigned autoconf_pad)
|
|||||||
params.idx = autoconf_pad;
|
params.idx = autoconf_pad;
|
||||||
strlcpy(params.name, xdk_joypad_name(autoconf_pad), sizeof(params.name));
|
strlcpy(params.name, xdk_joypad_name(autoconf_pad), sizeof(params.name));
|
||||||
strlcpy(params.driver, xdk_joypad.ident, sizeof(params.driver));
|
strlcpy(params.driver, xdk_joypad.ident, sizeof(params.driver));
|
||||||
input_config_autoconfigure_joypad(¶ms);
|
input_autoconfigure_joypad(¶ms);
|
||||||
}
|
}
|
||||||
|
|
||||||
static bool xdk_joypad_init(void *data)
|
static bool xdk_joypad_init(void *data)
|
||||||
@ -162,10 +162,10 @@ static void xdk_joypad_poll(void)
|
|||||||
if(gamepads[port])
|
if(gamepads[port])
|
||||||
XInputClose(gamepads[port]);
|
XInputClose(gamepads[port]);
|
||||||
|
|
||||||
gamepads[port] = 0;
|
gamepads[port] = 0;
|
||||||
pad_state[port] = 0;
|
pad_state[port] = 0;
|
||||||
|
|
||||||
input_config_autoconfigure_disconnect(port, xdk_joypad.ident);
|
input_autoconfigure_disconnect(port, xdk_joypad.ident);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* handle inserted devices. */
|
/* handle inserted devices. */
|
||||||
|
@ -268,7 +268,7 @@ static bool xinput_joypad_init(void *data)
|
|||||||
params.idx = autoconf_pad;
|
params.idx = autoconf_pad;
|
||||||
strlcpy(params.name, xinput_joypad_name(autoconf_pad), sizeof(params.name));
|
strlcpy(params.name, xinput_joypad_name(autoconf_pad), sizeof(params.name));
|
||||||
strlcpy(params.driver, xinput_joypad.ident, sizeof(params.driver));
|
strlcpy(params.driver, xinput_joypad.ident, sizeof(params.driver));
|
||||||
input_config_autoconfigure_joypad(¶ms);
|
input_autoconfigure_joypad(¶ms);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -34,7 +34,7 @@
|
|||||||
|
|
||||||
/* Adds an index for devices with the same name,
|
/* Adds an index for devices with the same name,
|
||||||
* so they can be identified in the GUI. */
|
* so they can be identified in the GUI. */
|
||||||
static void input_reindex_devices(void)
|
static void input_autoconfigure_joypad_reindex_devices(void)
|
||||||
{
|
{
|
||||||
unsigned i;
|
unsigned i;
|
||||||
settings_t *settings = config_get_ptr();
|
settings_t *settings = config_get_ptr();
|
||||||
@ -71,7 +71,7 @@ static void input_autoconfigure_joypad_conf(config_file_t *conf,
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
static int input_try_autoconfigure_joypad_from_conf(config_file_t *conf,
|
static int input_autoconfigure_joypad_try_from_conf(config_file_t *conf,
|
||||||
autoconfig_params_t *params)
|
autoconfig_params_t *params)
|
||||||
{
|
{
|
||||||
char ident[256];
|
char ident[256];
|
||||||
@ -163,13 +163,13 @@ static void input_autoconfigure_joypad_add(config_file_t *conf,
|
|||||||
if (!block_osd_spam)
|
if (!block_osd_spam)
|
||||||
runloop_msg_queue_push(msg, 2, 60, false);
|
runloop_msg_queue_push(msg, 2, 60, false);
|
||||||
}
|
}
|
||||||
input_reindex_devices();
|
input_autoconfigure_joypad_reindex_devices();
|
||||||
}
|
}
|
||||||
|
|
||||||
static int input_autoconfigure_joypad_from_conf(
|
static int input_autoconfigure_joypad_from_conf(
|
||||||
config_file_t *conf, autoconfig_params_t *params)
|
config_file_t *conf, autoconfig_params_t *params)
|
||||||
{
|
{
|
||||||
int ret = input_try_autoconfigure_joypad_from_conf(conf,
|
int ret = input_autoconfigure_joypad_try_from_conf(conf,
|
||||||
params);
|
params);
|
||||||
|
|
||||||
if (ret)
|
if (ret)
|
||||||
@ -217,7 +217,7 @@ static bool input_autoconfigure_joypad_from_conf_dir(
|
|||||||
conf = config_file_new(list->elems[i].data);
|
conf = config_file_new(list->elems[i].data);
|
||||||
|
|
||||||
if (conf)
|
if (conf)
|
||||||
ret = input_try_autoconfigure_joypad_from_conf(conf, params);
|
ret = input_autoconfigure_joypad_try_from_conf(conf, params);
|
||||||
|
|
||||||
if(ret >= current_best)
|
if(ret >= current_best)
|
||||||
{
|
{
|
||||||
@ -275,7 +275,7 @@ static bool input_autoconfigure_joypad_from_conf_internal(
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
static bool input_config_autoconfigure_joypad_init(autoconfig_params_t *params)
|
static bool input_autoconfigure_joypad_init(autoconfig_params_t *params)
|
||||||
{
|
{
|
||||||
size_t i;
|
size_t i;
|
||||||
settings_t *settings = config_get_ptr();
|
settings_t *settings = config_get_ptr();
|
||||||
@ -295,13 +295,13 @@ static bool input_config_autoconfigure_joypad_init(autoconfig_params_t *params)
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool input_config_autoconfigure_joypad(autoconfig_params_t *params)
|
bool input_autoconfigure_joypad(autoconfig_params_t *params)
|
||||||
{
|
{
|
||||||
char msg[255];
|
char msg[255];
|
||||||
|
|
||||||
msg[0] = '\0';
|
msg[0] = '\0';
|
||||||
|
|
||||||
if (!input_config_autoconfigure_joypad_init(params))
|
if (!input_autoconfigure_joypad_init(params))
|
||||||
goto error;
|
goto error;
|
||||||
|
|
||||||
if (string_is_empty(params->name))
|
if (string_is_empty(params->name))
|
||||||
@ -323,7 +323,7 @@ error:
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
void input_config_autoconfigure_disconnect(unsigned i, const char *ident)
|
void input_autoconfigure_disconnect(unsigned i, const char *ident)
|
||||||
{
|
{
|
||||||
char msg[255];
|
char msg[255];
|
||||||
|
|
||||||
|
@ -32,9 +32,9 @@ typedef struct autoconfig_params
|
|||||||
int32_t pid;
|
int32_t pid;
|
||||||
} autoconfig_params_t;
|
} autoconfig_params_t;
|
||||||
|
|
||||||
bool input_config_autoconfigure_joypad(autoconfig_params_t *params);
|
bool input_autoconfigure_joypad(autoconfig_params_t *params);
|
||||||
|
|
||||||
void input_config_autoconfigure_disconnect(unsigned i, const char *ident);
|
void input_autoconfigure_disconnect(unsigned i, const char *ident);
|
||||||
|
|
||||||
extern const char* const input_builtin_autoconfs[];
|
extern const char* const input_builtin_autoconfs[];
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user