diff --git a/console/rarch_console_input.c b/console/rarch_console_input.c index c5a9c9f5a8..9f61cc4f76 100644 --- a/console/rarch_console_input.c +++ b/console/rarch_console_input.c @@ -100,7 +100,7 @@ void rarch_input_set_keybind(unsigned player, unsigned keybind_action, uint64_t break; case KEYBIND_DEFAULT: - *key = g_settings.input.default_binds[default_retro_joypad_id]; + *key = g_settings.input.binds[default_retro_joypad_id]->def_joykey; break; default: @@ -113,7 +113,7 @@ void rarch_input_set_default_keybinds(unsigned player) for (unsigned i = 0; i < RARCH_CUSTOM_BIND_LIST_END; i++) { g_settings.input.binds[player][i].id = i; - g_settings.input.binds[player][i].joykey = g_settings.input.default_binds[i]; + g_settings.input.binds[player][i].joykey = g_settings.input.binds[i]->def_joykey; } g_settings.input.dpad_emulation[player] = DPAD_EMULATION_LSTICK; } diff --git a/driver.h b/driver.h index 39c7d090ff..490411e082 100644 --- a/driver.h +++ b/driver.h @@ -126,6 +126,9 @@ struct retro_keybind // Full 64-bit can be used for port-specific purposes, like simplifying multiple binds, etc. uint64_t joykey; + // Default key binding value - for resetting bind to default + uint64_t def_joykey; + uint32_t joyaxis; }; diff --git a/general.h b/general.h index c7c9085367..a1e7cd10b7 100644 --- a/general.h +++ b/general.h @@ -247,7 +247,6 @@ struct settings unsigned icade_count; #endif #ifdef RARCH_CONSOLE - uint64_t default_binds[RARCH_CUSTOM_BIND_LIST_END]; unsigned device[MAX_PLAYERS]; #endif bool netplay_client_swap_input; diff --git a/gx/gx_input.c b/gx/gx_input.c index 6cdd1d918f..5a745293dc 100644 --- a/gx/gx_input.c +++ b/gx/gx_input.c @@ -250,77 +250,77 @@ static void gx_set_default_keybind_lut(unsigned device, unsigned port) { #ifdef HW_RVL case GX_DEVICE_WIIMOTE: - g_settings.input.default_binds[RETRO_DEVICE_ID_JOYPAD_B] = platform_keys[GX_DEVICE_WIIMOTE_ID_JOYPAD_1].joykey; - g_settings.input.default_binds[RETRO_DEVICE_ID_JOYPAD_Y] = platform_keys[GX_DEVICE_WIIMOTE_ID_JOYPAD_A].joykey; - g_settings.input.default_binds[RETRO_DEVICE_ID_JOYPAD_SELECT] = platform_keys[GX_DEVICE_WIIMOTE_ID_JOYPAD_MINUS].joykey; - g_settings.input.default_binds[RETRO_DEVICE_ID_JOYPAD_START] = platform_keys[GX_DEVICE_WIIMOTE_ID_JOYPAD_PLUS].joykey; - g_settings.input.default_binds[RETRO_DEVICE_ID_JOYPAD_UP] = platform_keys[GX_DEVICE_WIIMOTE_ID_JOYPAD_UP].joykey; - g_settings.input.default_binds[RETRO_DEVICE_ID_JOYPAD_DOWN] = platform_keys[GX_DEVICE_WIIMOTE_ID_JOYPAD_DOWN].joykey; - g_settings.input.default_binds[RETRO_DEVICE_ID_JOYPAD_LEFT] = platform_keys[GX_DEVICE_WIIMOTE_ID_JOYPAD_LEFT].joykey; - g_settings.input.default_binds[RETRO_DEVICE_ID_JOYPAD_RIGHT] = platform_keys[GX_DEVICE_WIIMOTE_ID_JOYPAD_RIGHT].joykey; - g_settings.input.default_binds[RETRO_DEVICE_ID_JOYPAD_A] = platform_keys[GX_DEVICE_WIIMOTE_ID_JOYPAD_2].joykey; - g_settings.input.default_binds[RETRO_DEVICE_ID_JOYPAD_X] = platform_keys[GX_DEVICE_WIIMOTE_ID_JOYPAD_B].joykey; - g_settings.input.default_binds[RETRO_DEVICE_ID_JOYPAD_L] = NO_BTN; - g_settings.input.default_binds[RETRO_DEVICE_ID_JOYPAD_R] = NO_BTN; - g_settings.input.default_binds[RETRO_DEVICE_ID_JOYPAD_L2] = NO_BTN; - g_settings.input.default_binds[RETRO_DEVICE_ID_JOYPAD_R2] = NO_BTN; - g_settings.input.default_binds[RETRO_DEVICE_ID_JOYPAD_L3] = NO_BTN; - g_settings.input.default_binds[RETRO_DEVICE_ID_JOYPAD_R3] = NO_BTN; + g_settings.input.binds[RETRO_DEVICE_ID_JOYPAD_B]->def_joykey = platform_keys[GX_DEVICE_WIIMOTE_ID_JOYPAD_1].joykey; + g_settings.input.binds[RETRO_DEVICE_ID_JOYPAD_Y]->def_joykey = platform_keys[GX_DEVICE_WIIMOTE_ID_JOYPAD_A].joykey; + g_settings.input.binds[RETRO_DEVICE_ID_JOYPAD_SELECT]->def_joykey = platform_keys[GX_DEVICE_WIIMOTE_ID_JOYPAD_MINUS].joykey; + g_settings.input.binds[RETRO_DEVICE_ID_JOYPAD_START]->def_joykey = platform_keys[GX_DEVICE_WIIMOTE_ID_JOYPAD_PLUS].joykey; + g_settings.input.binds[RETRO_DEVICE_ID_JOYPAD_UP]->def_joykey = platform_keys[GX_DEVICE_WIIMOTE_ID_JOYPAD_UP].joykey; + g_settings.input.binds[RETRO_DEVICE_ID_JOYPAD_DOWN]->def_joykey = platform_keys[GX_DEVICE_WIIMOTE_ID_JOYPAD_DOWN].joykey; + g_settings.input.binds[RETRO_DEVICE_ID_JOYPAD_LEFT]->def_joykey = platform_keys[GX_DEVICE_WIIMOTE_ID_JOYPAD_LEFT].joykey; + g_settings.input.binds[RETRO_DEVICE_ID_JOYPAD_RIGHT]->def_joykey = platform_keys[GX_DEVICE_WIIMOTE_ID_JOYPAD_RIGHT].joykey; + g_settings.input.binds[RETRO_DEVICE_ID_JOYPAD_A]->def_joykey = platform_keys[GX_DEVICE_WIIMOTE_ID_JOYPAD_2].joykey; + g_settings.input.binds[RETRO_DEVICE_ID_JOYPAD_X]->def_joykey = platform_keys[GX_DEVICE_WIIMOTE_ID_JOYPAD_B].joykey; + g_settings.input.binds[RETRO_DEVICE_ID_JOYPAD_L]->def_joykey = NO_BTN; + g_settings.input.binds[RETRO_DEVICE_ID_JOYPAD_R]->def_joykey = NO_BTN; + g_settings.input.binds[RETRO_DEVICE_ID_JOYPAD_L2]->def_joykey = NO_BTN; + g_settings.input.binds[RETRO_DEVICE_ID_JOYPAD_R2]->def_joykey = NO_BTN; + g_settings.input.binds[RETRO_DEVICE_ID_JOYPAD_L3]->def_joykey = NO_BTN; + g_settings.input.binds[RETRO_DEVICE_ID_JOYPAD_R3]->def_joykey = NO_BTN; break; case GX_DEVICE_NUNCHUK: - g_settings.input.default_binds[RETRO_DEVICE_ID_JOYPAD_B] = platform_keys[GX_DEVICE_WIIMOTE_ID_JOYPAD_B].joykey; - g_settings.input.default_binds[RETRO_DEVICE_ID_JOYPAD_Y] = platform_keys[GX_DEVICE_WIIMOTE_ID_JOYPAD_2].joykey; - g_settings.input.default_binds[RETRO_DEVICE_ID_JOYPAD_SELECT] = platform_keys[GX_DEVICE_WIIMOTE_ID_JOYPAD_MINUS].joykey; - g_settings.input.default_binds[RETRO_DEVICE_ID_JOYPAD_START] = platform_keys[GX_DEVICE_WIIMOTE_ID_JOYPAD_PLUS].joykey; - g_settings.input.default_binds[RETRO_DEVICE_ID_JOYPAD_UP] = platform_keys[GX_DEVICE_WIIMOTE_ID_JOYPAD_UP].joykey; - g_settings.input.default_binds[RETRO_DEVICE_ID_JOYPAD_DOWN] = platform_keys[GX_DEVICE_WIIMOTE_ID_JOYPAD_DOWN].joykey; - g_settings.input.default_binds[RETRO_DEVICE_ID_JOYPAD_LEFT] = platform_keys[GX_DEVICE_WIIMOTE_ID_JOYPAD_LEFT].joykey; - g_settings.input.default_binds[RETRO_DEVICE_ID_JOYPAD_RIGHT] = platform_keys[GX_DEVICE_WIIMOTE_ID_JOYPAD_RIGHT].joykey; - g_settings.input.default_binds[RETRO_DEVICE_ID_JOYPAD_A] = platform_keys[GX_DEVICE_WIIMOTE_ID_JOYPAD_A].joykey; - g_settings.input.default_binds[RETRO_DEVICE_ID_JOYPAD_X] = platform_keys[GX_DEVICE_WIIMOTE_ID_JOYPAD_1].joykey; - g_settings.input.default_binds[RETRO_DEVICE_ID_JOYPAD_L] = platform_keys[GX_DEVICE_WIIMOTE_ID_JOYPAD_Z].joykey; - g_settings.input.default_binds[RETRO_DEVICE_ID_JOYPAD_R] = platform_keys[GX_DEVICE_WIIMOTE_ID_JOYPAD_C].joykey;; - g_settings.input.default_binds[RETRO_DEVICE_ID_JOYPAD_L2] = NO_BTN; - g_settings.input.default_binds[RETRO_DEVICE_ID_JOYPAD_R2] = NO_BTN; - g_settings.input.default_binds[RETRO_DEVICE_ID_JOYPAD_L3] = NO_BTN; - g_settings.input.default_binds[RETRO_DEVICE_ID_JOYPAD_R3] = NO_BTN; + g_settings.input.binds[RETRO_DEVICE_ID_JOYPAD_B]->def_joykey = platform_keys[GX_DEVICE_WIIMOTE_ID_JOYPAD_B].joykey; + g_settings.input.binds[RETRO_DEVICE_ID_JOYPAD_Y]->def_joykey = platform_keys[GX_DEVICE_WIIMOTE_ID_JOYPAD_2].joykey; + g_settings.input.binds[RETRO_DEVICE_ID_JOYPAD_SELECT]->def_joykey = platform_keys[GX_DEVICE_WIIMOTE_ID_JOYPAD_MINUS].joykey; + g_settings.input.binds[RETRO_DEVICE_ID_JOYPAD_START]->def_joykey = platform_keys[GX_DEVICE_WIIMOTE_ID_JOYPAD_PLUS].joykey; + g_settings.input.binds[RETRO_DEVICE_ID_JOYPAD_UP]->def_joykey = platform_keys[GX_DEVICE_WIIMOTE_ID_JOYPAD_UP].joykey; + g_settings.input.binds[RETRO_DEVICE_ID_JOYPAD_DOWN]->def_joykey = platform_keys[GX_DEVICE_WIIMOTE_ID_JOYPAD_DOWN].joykey; + g_settings.input.binds[RETRO_DEVICE_ID_JOYPAD_LEFT]->def_joykey = platform_keys[GX_DEVICE_WIIMOTE_ID_JOYPAD_LEFT].joykey; + g_settings.input.binds[RETRO_DEVICE_ID_JOYPAD_RIGHT]->def_joykey = platform_keys[GX_DEVICE_WIIMOTE_ID_JOYPAD_RIGHT].joykey; + g_settings.input.binds[RETRO_DEVICE_ID_JOYPAD_A]->def_joykey = platform_keys[GX_DEVICE_WIIMOTE_ID_JOYPAD_A].joykey; + g_settings.input.binds[RETRO_DEVICE_ID_JOYPAD_X]->def_joykey = platform_keys[GX_DEVICE_WIIMOTE_ID_JOYPAD_1].joykey; + g_settings.input.binds[RETRO_DEVICE_ID_JOYPAD_L]->def_joykey = platform_keys[GX_DEVICE_WIIMOTE_ID_JOYPAD_Z].joykey; + g_settings.input.binds[RETRO_DEVICE_ID_JOYPAD_R]->def_joykey = platform_keys[GX_DEVICE_WIIMOTE_ID_JOYPAD_C].joykey;; + g_settings.input.binds[RETRO_DEVICE_ID_JOYPAD_L2]->def_joykey = NO_BTN; + g_settings.input.binds[RETRO_DEVICE_ID_JOYPAD_R2]->def_joykey = NO_BTN; + g_settings.input.binds[RETRO_DEVICE_ID_JOYPAD_L3]->def_joykey = NO_BTN; + g_settings.input.binds[RETRO_DEVICE_ID_JOYPAD_R3]->def_joykey = NO_BTN; break; case GX_DEVICE_CLASSIC: - g_settings.input.default_binds[RETRO_DEVICE_ID_JOYPAD_B] = platform_keys[GX_DEVICE_CLASSIC_ID_JOYPAD_B].joykey; - g_settings.input.default_binds[RETRO_DEVICE_ID_JOYPAD_Y] = platform_keys[GX_DEVICE_CLASSIC_ID_JOYPAD_Y].joykey; - g_settings.input.default_binds[RETRO_DEVICE_ID_JOYPAD_SELECT] = platform_keys[GX_DEVICE_CLASSIC_ID_JOYPAD_MINUS].joykey; - g_settings.input.default_binds[RETRO_DEVICE_ID_JOYPAD_START] = platform_keys[GX_DEVICE_CLASSIC_ID_JOYPAD_PLUS].joykey; - g_settings.input.default_binds[RETRO_DEVICE_ID_JOYPAD_UP] = platform_keys[GX_DEVICE_CLASSIC_ID_JOYPAD_UP].joykey; - g_settings.input.default_binds[RETRO_DEVICE_ID_JOYPAD_DOWN] = platform_keys[GX_DEVICE_CLASSIC_ID_JOYPAD_DOWN].joykey; - g_settings.input.default_binds[RETRO_DEVICE_ID_JOYPAD_LEFT] = platform_keys[GX_DEVICE_CLASSIC_ID_JOYPAD_LEFT].joykey; - g_settings.input.default_binds[RETRO_DEVICE_ID_JOYPAD_RIGHT] = platform_keys[GX_DEVICE_CLASSIC_ID_JOYPAD_RIGHT].joykey; - g_settings.input.default_binds[RETRO_DEVICE_ID_JOYPAD_A] = platform_keys[GX_DEVICE_CLASSIC_ID_JOYPAD_A].joykey; - g_settings.input.default_binds[RETRO_DEVICE_ID_JOYPAD_X] = platform_keys[GX_DEVICE_CLASSIC_ID_JOYPAD_X].joykey; - g_settings.input.default_binds[RETRO_DEVICE_ID_JOYPAD_L] = platform_keys[GX_DEVICE_CLASSIC_ID_JOYPAD_L_TRIGGER].joykey; - g_settings.input.default_binds[RETRO_DEVICE_ID_JOYPAD_R] = platform_keys[GX_DEVICE_CLASSIC_ID_JOYPAD_R_TRIGGER].joykey; - g_settings.input.default_binds[RETRO_DEVICE_ID_JOYPAD_L2] = platform_keys[GX_DEVICE_CLASSIC_ID_JOYPAD_ZL_TRIGGER].joykey; - g_settings.input.default_binds[RETRO_DEVICE_ID_JOYPAD_R2] = platform_keys[GX_DEVICE_CLASSIC_ID_JOYPAD_ZR_TRIGGER].joykey; - g_settings.input.default_binds[RETRO_DEVICE_ID_JOYPAD_L3] = NO_BTN; - g_settings.input.default_binds[RETRO_DEVICE_ID_JOYPAD_R3] = NO_BTN; + g_settings.input.binds[RETRO_DEVICE_ID_JOYPAD_B]->def_joykey = platform_keys[GX_DEVICE_CLASSIC_ID_JOYPAD_B].joykey; + g_settings.input.binds[RETRO_DEVICE_ID_JOYPAD_Y]->def_joykey = platform_keys[GX_DEVICE_CLASSIC_ID_JOYPAD_Y].joykey; + g_settings.input.binds[RETRO_DEVICE_ID_JOYPAD_SELECT]->def_joykey = platform_keys[GX_DEVICE_CLASSIC_ID_JOYPAD_MINUS].joykey; + g_settings.input.binds[RETRO_DEVICE_ID_JOYPAD_START]->def_joykey = platform_keys[GX_DEVICE_CLASSIC_ID_JOYPAD_PLUS].joykey; + g_settings.input.binds[RETRO_DEVICE_ID_JOYPAD_UP]->def_joykey = platform_keys[GX_DEVICE_CLASSIC_ID_JOYPAD_UP].joykey; + g_settings.input.binds[RETRO_DEVICE_ID_JOYPAD_DOWN]->def_joykey = platform_keys[GX_DEVICE_CLASSIC_ID_JOYPAD_DOWN].joykey; + g_settings.input.binds[RETRO_DEVICE_ID_JOYPAD_LEFT]->def_joykey = platform_keys[GX_DEVICE_CLASSIC_ID_JOYPAD_LEFT].joykey; + g_settings.input.binds[RETRO_DEVICE_ID_JOYPAD_RIGHT]->def_joykey = platform_keys[GX_DEVICE_CLASSIC_ID_JOYPAD_RIGHT].joykey; + g_settings.input.binds[RETRO_DEVICE_ID_JOYPAD_A]->def_joykey = platform_keys[GX_DEVICE_CLASSIC_ID_JOYPAD_A].joykey; + g_settings.input.binds[RETRO_DEVICE_ID_JOYPAD_X]->def_joykey = platform_keys[GX_DEVICE_CLASSIC_ID_JOYPAD_X].joykey; + g_settings.input.binds[RETRO_DEVICE_ID_JOYPAD_L]->def_joykey = platform_keys[GX_DEVICE_CLASSIC_ID_JOYPAD_L_TRIGGER].joykey; + g_settings.input.binds[RETRO_DEVICE_ID_JOYPAD_R]->def_joykey = platform_keys[GX_DEVICE_CLASSIC_ID_JOYPAD_R_TRIGGER].joykey; + g_settings.input.binds[RETRO_DEVICE_ID_JOYPAD_L2]->def_joykey = platform_keys[GX_DEVICE_CLASSIC_ID_JOYPAD_ZL_TRIGGER].joykey; + g_settings.input.binds[RETRO_DEVICE_ID_JOYPAD_R2]->def_joykey = platform_keys[GX_DEVICE_CLASSIC_ID_JOYPAD_ZR_TRIGGER].joykey; + g_settings.input.binds[RETRO_DEVICE_ID_JOYPAD_L3]->def_joykey = NO_BTN; + g_settings.input.binds[RETRO_DEVICE_ID_JOYPAD_R3]->def_joykey = NO_BTN; break; #endif case GX_DEVICE_GAMECUBE: - g_settings.input.default_binds[RETRO_DEVICE_ID_JOYPAD_B] = platform_keys[GX_DEVICE_GC_ID_JOYPAD_B].joykey; - g_settings.input.default_binds[RETRO_DEVICE_ID_JOYPAD_Y] = platform_keys[GX_DEVICE_GC_ID_JOYPAD_Y].joykey; - g_settings.input.default_binds[RETRO_DEVICE_ID_JOYPAD_SELECT] = platform_keys[GX_DEVICE_GC_ID_JOYPAD_Z_TRIGGER].joykey; - g_settings.input.default_binds[RETRO_DEVICE_ID_JOYPAD_START] = platform_keys[GX_DEVICE_GC_ID_JOYPAD_START].joykey; - g_settings.input.default_binds[RETRO_DEVICE_ID_JOYPAD_UP] = platform_keys[GX_DEVICE_GC_ID_JOYPAD_UP].joykey; - g_settings.input.default_binds[RETRO_DEVICE_ID_JOYPAD_DOWN] = platform_keys[GX_DEVICE_GC_ID_JOYPAD_DOWN].joykey; - g_settings.input.default_binds[RETRO_DEVICE_ID_JOYPAD_LEFT] = platform_keys[GX_DEVICE_GC_ID_JOYPAD_LEFT].joykey; - g_settings.input.default_binds[RETRO_DEVICE_ID_JOYPAD_RIGHT] = platform_keys[GX_DEVICE_GC_ID_JOYPAD_RIGHT].joykey; - g_settings.input.default_binds[RETRO_DEVICE_ID_JOYPAD_A] = platform_keys[GX_DEVICE_GC_ID_JOYPAD_A].joykey; - g_settings.input.default_binds[RETRO_DEVICE_ID_JOYPAD_X] = platform_keys[GX_DEVICE_GC_ID_JOYPAD_X].joykey; - g_settings.input.default_binds[RETRO_DEVICE_ID_JOYPAD_L] = platform_keys[GX_DEVICE_GC_ID_JOYPAD_L_TRIGGER].joykey; - g_settings.input.default_binds[RETRO_DEVICE_ID_JOYPAD_R] = platform_keys[GX_DEVICE_GC_ID_JOYPAD_R_TRIGGER].joykey; - g_settings.input.default_binds[RETRO_DEVICE_ID_JOYPAD_L2] = NO_BTN; - g_settings.input.default_binds[RETRO_DEVICE_ID_JOYPAD_R2] = NO_BTN; - g_settings.input.default_binds[RETRO_DEVICE_ID_JOYPAD_L3] = NO_BTN; - g_settings.input.default_binds[RETRO_DEVICE_ID_JOYPAD_R3] = NO_BTN; + g_settings.input.binds[RETRO_DEVICE_ID_JOYPAD_B]->def_joykey = platform_keys[GX_DEVICE_GC_ID_JOYPAD_B].joykey; + g_settings.input.binds[RETRO_DEVICE_ID_JOYPAD_Y]->def_joykey = platform_keys[GX_DEVICE_GC_ID_JOYPAD_Y].joykey; + g_settings.input.binds[RETRO_DEVICE_ID_JOYPAD_SELECT]->def_joykey = platform_keys[GX_DEVICE_GC_ID_JOYPAD_Z_TRIGGER].joykey; + g_settings.input.binds[RETRO_DEVICE_ID_JOYPAD_START]->def_joykey = platform_keys[GX_DEVICE_GC_ID_JOYPAD_START].joykey; + g_settings.input.binds[RETRO_DEVICE_ID_JOYPAD_UP]->def_joykey = platform_keys[GX_DEVICE_GC_ID_JOYPAD_UP].joykey; + g_settings.input.binds[RETRO_DEVICE_ID_JOYPAD_DOWN]->def_joykey = platform_keys[GX_DEVICE_GC_ID_JOYPAD_DOWN].joykey; + g_settings.input.binds[RETRO_DEVICE_ID_JOYPAD_LEFT]->def_joykey = platform_keys[GX_DEVICE_GC_ID_JOYPAD_LEFT].joykey; + g_settings.input.binds[RETRO_DEVICE_ID_JOYPAD_RIGHT]->def_joykey = platform_keys[GX_DEVICE_GC_ID_JOYPAD_RIGHT].joykey; + g_settings.input.binds[RETRO_DEVICE_ID_JOYPAD_A]->def_joykey = platform_keys[GX_DEVICE_GC_ID_JOYPAD_A].joykey; + g_settings.input.binds[RETRO_DEVICE_ID_JOYPAD_X]->def_joykey = platform_keys[GX_DEVICE_GC_ID_JOYPAD_X].joykey; + g_settings.input.binds[RETRO_DEVICE_ID_JOYPAD_L]->def_joykey = platform_keys[GX_DEVICE_GC_ID_JOYPAD_L_TRIGGER].joykey; + g_settings.input.binds[RETRO_DEVICE_ID_JOYPAD_R]->def_joykey = platform_keys[GX_DEVICE_GC_ID_JOYPAD_R_TRIGGER].joykey; + g_settings.input.binds[RETRO_DEVICE_ID_JOYPAD_L2]->def_joykey = NO_BTN; + g_settings.input.binds[RETRO_DEVICE_ID_JOYPAD_R2]->def_joykey = NO_BTN; + g_settings.input.binds[RETRO_DEVICE_ID_JOYPAD_L3]->def_joykey = NO_BTN; + g_settings.input.binds[RETRO_DEVICE_ID_JOYPAD_R3]->def_joykey = NO_BTN; break; default: break; diff --git a/ps3/ps3_input.c b/ps3/ps3_input.c index 6848cccb88..293a95854b 100644 --- a/ps3/ps3_input.c +++ b/ps3/ps3_input.c @@ -433,7 +433,7 @@ static void ps3_set_default_keybind_lut(unsigned device, unsigned port) (void)port; for (int i = 0; i < RARCH_CUSTOM_BIND_LIST_END; i++) - g_settings.input.default_binds[i] = platform_keys[i].joykey; + g_settings.input.binds[i]->def_joykey = platform_keys[i].joykey; } static void* ps3_input_init(void) diff --git a/xdk/xdk_xinput_input.c b/xdk/xdk_xinput_input.c index d7b0260752..10f2edee15 100644 --- a/xdk/xdk_xinput_input.c +++ b/xdk/xdk_xinput_input.c @@ -275,7 +275,7 @@ static void xdk_set_default_keybind_lut(unsigned device, unsigned port) (void)port; for (int i = 0; i < RARCH_CUSTOM_BIND_LIST_END; i++) - g_settings.input.default_binds[i] = platform_keys[i].joykey; + g_settings.input.binds[i]->def_joykey = platform_keys[i].joykey; } static void xdk_input_set_analog_dpad_mapping(unsigned device, unsigned map_dpad_enum, unsigned controller_id)