Let's show rumble and analog support info only if the game supports it.

This commit is contained in:
sergiobenrocha2 2016-01-03 16:40:37 -02:00
parent 11adcc01e0
commit 1dd57f6e86

View File

@ -1400,24 +1400,21 @@ static int menu_displaylist_parse_database_entry(menu_displaylist_info_t *info)
goto error; goto error;
} }
snprintf(tmp, sizeof(tmp), if (db_info_entry->analog_supported == 1)
"%s : %s", {
"Analog supported", if (create_string_list_rdb_entry_string("Analog supported",
(db_info_entry->analog_supported == 1) ? menu_hash_to_str(MENU_VALUE_TRUE) : menu_hash_to_str(MENU_LABEL_RDB_ENTRY_ANALOG),
(db_info_entry->analog_supported == -1) ? menu_hash_to_str(MENU_VALUE_NOT_AVAILABLE) : menu_hash_to_str(MENU_VALUE_TRUE), info->path, info->list) == -1)
menu_hash_to_str(MENU_VALUE_FALSE)); goto error;
menu_entries_push(info->list, tmp, }
menu_hash_to_str(MENU_LABEL_RDB_ENTRY_ANALOG),
0, 0, 0); if (db_info_entry->rumble_supported == 1)
snprintf(tmp, sizeof(tmp), {
"%s : %s", if (create_string_list_rdb_entry_string("Rumble supported",
"Rumble supported", menu_hash_to_str(MENU_LABEL_RDB_ENTRY_RUMBLE),
(db_info_entry->rumble_supported == 1) ? menu_hash_to_str(MENU_VALUE_TRUE) : menu_hash_to_str(MENU_VALUE_TRUE), info->path, info->list) == -1)
(db_info_entry->rumble_supported == -1) ? menu_hash_to_str(MENU_VALUE_NOT_AVAILABLE) : goto error;
menu_hash_to_str(MENU_VALUE_FALSE)); }
menu_entries_push(info->list, tmp,
menu_hash_to_str(MENU_LABEL_RDB_ENTRY_RUMBLE),
0, 0, 0);
if (!show_advanced_settings) if (!show_advanced_settings)
continue; continue;