don't show the keymapper labels when not required

This commit is contained in:
radius 2017-09-10 17:20:44 -05:00
parent bb2a92c980
commit f1f4d629ad
4 changed files with 26 additions and 12 deletions

View File

@ -488,6 +488,7 @@ static void menu_action_setting_disp_set_label_input_desc(
}
#ifdef HAVE_KEYMAPPER
static void menu_action_setting_disp_set_label_input_desc_kbd(
file_list_t* list,
unsigned *w, unsigned type, unsigned i,
@ -517,7 +518,7 @@ static void menu_action_setting_disp_set_label_input_desc_kbd(
*w = 19;
strlcpy(s2, path, len2);
}
#endif
static void menu_action_setting_disp_set_label_cheat(
file_list_t* list,

View File

@ -113,6 +113,7 @@ static int action_left_input_desc(unsigned type, const char *label,
return 0;
}
#ifdef HAVE_KEYMAPPER
static int action_left_input_desc_kbd(unsigned type, const char *label,
bool wraparound)
{
@ -141,6 +142,7 @@ static int action_left_input_desc_kbd(unsigned type, const char *label,
return 0;
}
#endif
static int action_left_scroll(unsigned type, const char *label,
bool wraparound)

View File

@ -102,6 +102,7 @@ int action_right_cheat(unsigned type, const char *label,
wraparound);
}
#ifdef HAVE_KEYMAPPER
int action_right_input_desc_kbd(unsigned type, const char *label,
bool wraparound)
{
@ -130,6 +131,7 @@ int action_right_input_desc_kbd(unsigned type, const char *label,
return 0;
}
#endif
int action_right_input_desc(unsigned type, const char *label,
bool wraparound)

View File

@ -3504,9 +3504,16 @@ static int menu_displaylist_parse_options_remappings(
}
}
}
#ifdef HAVE_KEYMAPPER
if (system)
{
settings_t *settings = config_get_ptr();
unsigned device = settings->uints.input_libretro_device[settings->uints.keymapper_port];
device &= RETRO_DEVICE_MASK;
if (device == RETRO_DEVICE_KEYBOARD)
{
for (retro_id = 0; retro_id < RARCH_FIRST_CUSTOM_BIND; retro_id++)
{
char desc_label[64];
@ -3523,6 +3530,8 @@ static int menu_displaylist_parse_options_remappings(
MENU_SETTINGS_INPUT_DESC_KBD_BEGIN + retro_id, 0, 0);
}
}
}
#endif
return 0;
}