From e6f637ea6b6e2a3fbeae63033cfec5ed232915a4 Mon Sep 17 00:00:00 2001 From: twinaphex Date: Sat, 20 Jan 2018 03:13:55 +0100 Subject: [PATCH] Set autoconfig binds for Xbox --- input/drivers_joypad/xdk_joypad.c | 2 +- input/input_autodetect_builtin.c | 5 ++++- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/input/drivers_joypad/xdk_joypad.c b/input/drivers_joypad/xdk_joypad.c index 3132778ea0..4048eda468 100644 --- a/input/drivers_joypad/xdk_joypad.c +++ b/input/drivers_joypad/xdk_joypad.c @@ -35,7 +35,7 @@ static const char* const XBOX_CONTROLLER_NAMES[4] = static const char *xdk_joypad_name(unsigned pad) { - return input_config_get_device_name(pad); + return XBOX_CONTROLLER_NAMES[pad]; } static void xdk_joypad_autodetect_add(unsigned autoconf_pad) diff --git a/input/input_autodetect_builtin.c b/input/input_autodetect_builtin.c index b524f6555e..a7f12dda43 100644 --- a/input/input_autodetect_builtin.c +++ b/input/input_autodetect_builtin.c @@ -558,7 +558,10 @@ DECL_AXIS(r_y_minus, -3) const char* const input_builtin_autoconfs[] = { #if defined(_WIN32) && defined(_XBOX) - DECL_AUTOCONF_DEVICE("XInput Controller", "xdk", XINPUT_DEFAULT_BINDS), + DECL_AUTOCONF_DEVICE("XInput Controller (User 1)", "xdk", XINPUT_DEFAULT_BINDS), + DECL_AUTOCONF_DEVICE("XInput Controller (User 2)", "xdk", XINPUT_DEFAULT_BINDS), + DECL_AUTOCONF_DEVICE("XInput Controller (User 3)", "xdk", XINPUT_DEFAULT_BINDS), + DECL_AUTOCONF_DEVICE("XInput Controller (User 4)", "xdk", XINPUT_DEFAULT_BINDS), #elif defined(_WIN32) #if !defined(__STDC_C89__) && !defined(__STDC_C89_AMENDMENT_1__) DECL_AUTOCONF_DEVICE("XInput Controller (User 1)", "xinput", XINPUT_DEFAULT_BINDS),