From 4cdd4eb8db96320aa8a1e297a61ec48268a97685 Mon Sep 17 00:00:00 2001 From: Twinaphex Date: Sun, 29 Jul 2012 17:09:48 +0200 Subject: [PATCH] We need to implement this properly or not at all - removing this hackish thing for now --- console/rarch_console_input.c | 32 -------------------------------- console/rarch_console_input.h | 3 --- ps3/frontend/main.c | 2 -- xdk/frontend/main.c | 2 -- 4 files changed, 39 deletions(-) diff --git a/console/rarch_console_input.c b/console/rarch_console_input.c index d898a37a22..a93a1bfb38 100644 --- a/console/rarch_console_input.c +++ b/console/rarch_console_input.c @@ -152,35 +152,3 @@ const char *rarch_input_get_default_keybind_name(unsigned id) } #endif - -/* TODO: Hackish, try to do this in a cleaner, more extensible and less hardcoded way */ - -void rarch_input_set_default_keybind_names_for_emulator(void) -{ - struct retro_system_info info; -#ifdef ANDROID - pretro_get_system_info(&info); -#else - retro_get_system_info(&info); -#endif - const char *id = info.library_name ? info.library_name : "Unknown"; - - // Genesis Plus GX/Next - if (strstr(id, "Genesis Plus GX")) - { - strlcpy(rarch_default_libretro_keybind_name_lut[RETRO_DEVICE_ID_JOYPAD_B], - "B button", sizeof(rarch_default_libretro_keybind_name_lut[RETRO_DEVICE_ID_JOYPAD_B])); - strlcpy(rarch_default_libretro_keybind_name_lut[RETRO_DEVICE_ID_JOYPAD_A], - "C button", sizeof(rarch_default_libretro_keybind_name_lut[RETRO_DEVICE_ID_JOYPAD_A])); - strlcpy(rarch_default_libretro_keybind_name_lut[RETRO_DEVICE_ID_JOYPAD_X], - "Y button", sizeof(rarch_default_libretro_keybind_name_lut[RETRO_DEVICE_ID_JOYPAD_X])); - strlcpy(rarch_default_libretro_keybind_name_lut[RETRO_DEVICE_ID_JOYPAD_Y], - "A button", sizeof(rarch_default_libretro_keybind_name_lut[RETRO_DEVICE_ID_JOYPAD_Y])); - strlcpy(rarch_default_libretro_keybind_name_lut[RETRO_DEVICE_ID_JOYPAD_L], - "X button", sizeof(rarch_default_libretro_keybind_name_lut[RETRO_DEVICE_ID_JOYPAD_L])); - strlcpy(rarch_default_libretro_keybind_name_lut[RETRO_DEVICE_ID_JOYPAD_R], - "Z button", sizeof(rarch_default_libretro_keybind_name_lut[RETRO_DEVICE_ID_JOYPAD_R])); - strlcpy(rarch_default_libretro_keybind_name_lut[RETRO_DEVICE_ID_JOYPAD_SELECT], - "Mode button", sizeof(rarch_default_libretro_keybind_name_lut[RETRO_DEVICE_ID_JOYPAD_SELECT])); - } -} diff --git a/console/rarch_console_input.h b/console/rarch_console_input.h index 92aaaf6e0f..ee77ea1ae4 100644 --- a/console/rarch_console_input.h +++ b/console/rarch_console_input.h @@ -40,9 +40,6 @@ extern char rarch_default_libretro_keybind_name_lut[RARCH_FIRST_META_KEY][256]; #ifdef HAVE_DEFAULT_RETROPAD_INPUT const char *rarch_input_find_platform_key_label(uint64_t joykey); -// Sets custom default keybind names (some systems emulated by the emulator -// will need different keybind names for buttons, etc.) -void rarch_input_set_default_keybind_names_for_emulator(void); void rarch_input_set_default_keybinds(unsigned player); void rarch_input_set_keybind(unsigned player, unsigned keybind_action, uint64_t default_retro_joypad_id); diff --git a/ps3/frontend/main.c b/ps3/frontend/main.c index 28928f3b35..1ed758ad86 100644 --- a/ps3/frontend/main.c +++ b/ps3/frontend/main.c @@ -294,8 +294,6 @@ int main(int argc, char *argv[]) oskutil_init(&g_console.oskutil_handle, 0); #endif - rarch_input_set_default_keybind_names_for_emulator(); - menu_init(); switch(g_console.external_launcher_support) diff --git a/xdk/frontend/main.c b/xdk/frontend/main.c index 674d3b6ad4..958f3b30df 100644 --- a/xdk/frontend/main.c +++ b/xdk/frontend/main.c @@ -147,8 +147,6 @@ int main(int argc, char *argv[]) video_null.start(); #endif - rarch_input_set_default_keybind_names_for_emulator(); - menu_init(); begin_loop: