From 55d621e062d1fe4b9717c3eee5e0d2c526c7daab Mon Sep 17 00:00:00 2001 From: Twinaphex Date: Fri, 13 Apr 2012 06:12:51 +0200 Subject: [PATCH] (PS3) Make use of ssnes_set_default_keybinds in ps3/main.c --- console/console_ext.c | 1 + console/console_ext_input.h | 7 +++++++ ps3/main.c | 9 +-------- ps3/shared.h | 7 ------- 4 files changed, 9 insertions(+), 15 deletions(-) diff --git a/console/console_ext.c b/console/console_ext.c index 420c3a99dd..b85970a4bd 100644 --- a/console/console_ext.c +++ b/console/console_ext.c @@ -538,6 +538,7 @@ void ssnes_input_set_default_keybinds(unsigned player) g_settings.input.binds[player][i].id = i; g_settings.input.binds[player][i].joykey = ssnes_default_keybind_lut[i]; } + g_settings.input.dpad_emulation[player] = DPAD_EMULATION_LSTICK; } void ssnes_input_set_default_keybind_names_for_emulator(void) diff --git a/console/console_ext_input.h b/console/console_ext_input.h index 959704d001..4ae88b885b 100644 --- a/console/console_ext_input.h +++ b/console/console_ext_input.h @@ -27,6 +27,13 @@ enum keybind_set_id KEYBIND_DEFAULT }; +enum +{ + DPAD_EMULATION_NONE, + DPAD_EMULATION_LSTICK, + DPAD_EMULATION_RSTICK +}; + #if defined(__CELLOS_LV2__) #include "../ps3/ps3_input.h" enum ps3_device_id diff --git a/ps3/main.c b/ps3/main.c index 6d96787774..bbd99a354e 100644 --- a/ps3/main.c +++ b/ps3/main.c @@ -115,14 +115,7 @@ static void set_default_settings(void) ssnes_default_keybind_lut[RETRO_DEVICE_ID_JOYPAD_R] = ssnes_platform_keybind_lut[PS3_DEVICE_ID_JOYPAD_R1]; for(uint32_t x = 0; x < MAX_PLAYERS; x++) - { - for(uint32_t y = 0; y < SSNES_FIRST_META_KEY; y++) - { - g_settings.input.binds[x][y].id = y; - g_settings.input.binds[x][y].joykey = ssnes_default_keybind_lut[y]; - } - g_settings.input.dpad_emulation[x] = DPAD_EMULATION_LSTICK; - } + ssnes_input_set_default_keybinds(x); // g_console g_console.block_config_read = true; diff --git a/ps3/shared.h b/ps3/shared.h index fbe24b5aa5..916a1b0d81 100644 --- a/ps3/shared.h +++ b/ps3/shared.h @@ -33,13 +33,6 @@ #define LIGHTBLUE 0xFFFFE0E0U #define LIGHTORANGE 0xFFE0EEFFu -enum -{ - DPAD_EMULATION_NONE, - DPAD_EMULATION_LSTICK, - DPAD_EMULATION_RSTICK -}; - enum { EXTERN_LAUNCHER_SALAMANDER,