mirror of
https://github.com/CTCaer/RetroArch.git
synced 2025-01-26 21:36:26 +00:00
Start adding new values
This commit is contained in:
parent
14a7f2b442
commit
a1e517470c
@ -1462,6 +1462,8 @@ static const char *menu_hash_to_str_us_label_enum(enum msg_hash_enums msg)
|
||||
return "add_content";
|
||||
case MENU_ENUM_LABEL_OVERLAY_AUTOLOAD_PREFERRED:
|
||||
return "overlay_autoload_preferred";
|
||||
case MENU_ENUM_LABEL_INFORMATION:
|
||||
return "information";
|
||||
case MENU_ENUM_LABEL_INFORMATION_LIST:
|
||||
return "information_list";
|
||||
case MENU_ENUM_LABEL_USE_BUILTIN_PLAYER:
|
||||
@ -2596,6 +2598,8 @@ const char *msg_hash_to_str_us(enum msg_hash_enums msg)
|
||||
return "Scan Directory";
|
||||
case MENU_ENUM_LABEL_VALUE_ADD_CONTENT_LIST:
|
||||
return "Add Content";
|
||||
case MENU_ENUM_LABEL_VALUE_INFORMATION:
|
||||
return "Information";
|
||||
case MENU_ENUM_LABEL_VALUE_INFORMATION_LIST:
|
||||
return "Information";
|
||||
case MENU_ENUM_LABEL_VALUE_USE_BUILTIN_PLAYER:
|
||||
|
@ -13,6 +13,8 @@
|
||||
* If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#include <compat/strl.h>
|
||||
|
||||
#include "../menu_driver.h"
|
||||
#include "../menu_cbs.h"
|
||||
#include "../menu_navigation.h"
|
||||
@ -28,23 +30,31 @@ static int action_bind_label_generic(char *s, size_t len)
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int action_bind_label_information(char *s, size_t len)
|
||||
{
|
||||
strlcpy(s, msg_hash_to_str(MENU_ENUM_LABEL_VALUE_INFORMATION), len);
|
||||
return 0;
|
||||
}
|
||||
|
||||
int menu_cbs_init_bind_label(menu_file_list_cbs_t *cbs,
|
||||
const char *path, const char *label, unsigned type, size_t idx)
|
||||
{
|
||||
if (!cbs)
|
||||
return -1;
|
||||
|
||||
BIND_ACTION_LABEL(cbs, action_bind_label_generic);
|
||||
|
||||
if (cbs->enum_idx != MSG_UNKNOWN)
|
||||
{
|
||||
switch (cbs->enum_idx)
|
||||
{
|
||||
case 0:
|
||||
case MENU_ENUM_LABEL_INFORMATION:
|
||||
BIND_ACTION_LABEL(cbs, action_bind_label_information);
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
BIND_ACTION_LABEL(cbs, action_bind_label_generic);
|
||||
|
||||
return -1;
|
||||
}
|
||||
|
@ -2869,7 +2869,8 @@ static int menu_displaylist_parse_horizontal_content_actions(
|
||||
sizeof(db_path));
|
||||
|
||||
menu_entries_add_enum(info->list, label,
|
||||
db_path, MSG_UNKNOWN, FILE_TYPE_RDB_ENTRY, 0, idx);
|
||||
db_path,
|
||||
MENU_ENUM_LABEL_INFORMATION, FILE_TYPE_RDB_ENTRY, 0, idx);
|
||||
}
|
||||
|
||||
return 0;
|
||||
|
@ -83,10 +83,7 @@ void menu_entry_get_path(uint32_t i, char *s, size_t len)
|
||||
menu_entry_t entry = {{0}};
|
||||
menu_entry_get(&entry, 0, i, NULL, true);
|
||||
|
||||
if (!string_is_empty(entry.rich_label))
|
||||
strlcpy(s, entry.rich_label, len);
|
||||
else
|
||||
strlcpy(s, entry.path, len);
|
||||
strlcpy(s, entry.path, len);
|
||||
}
|
||||
|
||||
void menu_entry_get_label(uint32_t i, char *s, size_t len)
|
||||
@ -297,7 +294,7 @@ void menu_entry_get(menu_entry_t *entry, size_t stack_idx,
|
||||
entry->path, sizeof(entry->path));
|
||||
}
|
||||
|
||||
if (cbs && cbs->action_label)
|
||||
if (cbs->action_label)
|
||||
cbs->action_label(entry->rich_label,
|
||||
sizeof(entry->rich_label));
|
||||
}
|
||||
|
@ -790,6 +790,8 @@ enum msg_hash_enums
|
||||
MENU_ENUM_LABEL_VALUE_UPDATE_CG_SHADERS,
|
||||
MENU_ENUM_LABEL_VALUE_UPDATE_GLSL_SHADERS,
|
||||
|
||||
MENU_ENUM_LABEL_INFORMATION,
|
||||
MENU_ENUM_LABEL_VALUE_INFORMATION,
|
||||
MENU_ENUM_LABEL_INFORMATION_LIST,
|
||||
MENU_ENUM_LABEL_VALUE_INFORMATION_LIST,
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user