Set autoconfig binds for Xbox

This commit is contained in:
twinaphex 2018-01-20 03:13:55 +01:00
parent 9172765252
commit e6f637ea6b
2 changed files with 5 additions and 2 deletions

View File

@ -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)

View File

@ -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),