From 24b702ab701b4253703de4bc973bc3baf1093b65 Mon Sep 17 00:00:00 2001 From: Themaister Date: Mon, 6 May 2013 16:24:13 +0200 Subject: [PATCH] Should fix autoconfig bug when joypad index > 0. --- settings.c | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/settings.c b/settings.c index 0b0a838ddc..310846beec 100644 --- a/settings.c +++ b/settings.c @@ -223,7 +223,14 @@ void config_set_defaults(void) for (unsigned i = 1; i < MAX_PLAYERS; i++) memcpy(g_settings.input.binds[i], retro_keybinds_rest, sizeof(retro_keybinds_rest)); - memcpy(g_settings.input.autoconf_binds, g_settings.input.binds, sizeof(g_settings.input.binds)); + for (unsigned i = 0; i < MAX_PLAYERS; i++) + { + for (unsigned j = 0; j < RARCH_BIND_LIST_END; j++) + { + g_settings.input.autoconf_binds[i][j].joykey = NO_BTN; + g_settings.input.autoconf_binds[i][j].joyaxis = AXIS_NONE; + } + } // Verify that binds are in proper order. for (int i = 0; i < MAX_PLAYERS; i++)