mirror of
https://github.com/libretro/RetroArch.git
synced 2024-11-29 03:00:24 +00:00
(menu_entries_cbs_ok.c) Get rid of more strcmps
This commit is contained in:
parent
4757139272
commit
921fcf134d
@ -23,6 +23,23 @@
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#define MENU_LABEL_RDB_ENTRY_PUBLISHER 0x4d7bcdfbU
|
||||
#define MENU_LABEL_RDB_ENTRY_DEVELOPER 0x06f61093U
|
||||
#define MENU_LABEL_RDB_ENTRY_ORIGIN 0xb176aad5U
|
||||
#define MENU_LABEL_RDB_ENTRY_FRANCHISE 0xb31764a0U
|
||||
#define MENU_LABEL_RDB_ENTRY_ENHANCEMENT_HW 0x79ee4f11U
|
||||
#define MENU_LABEL_RDB_ENTRY_ESRB_RATING 0xe138fa3dU
|
||||
#define MENU_LABEL_RDB_ENTRY_BBFC_RATING 0x82dbc01eU
|
||||
#define MENU_LABEL_RDB_ENTRY_ELSPA_RATING 0x0def0906U
|
||||
#define MENU_LABEL_RDB_ENTRY_PEGI_RATING 0xd814cb56U
|
||||
#define MENU_LABEL_RDB_ENTRY_CERO_RATING 0x9d436f5aU
|
||||
#define MENU_LABEL_RDB_ENTRY_EDGE_MAGAZINE_RATING 0x9735f631U
|
||||
#define MENU_LABEL_RDB_ENTRY_EDGE_MAGAZINE_ISSUE 0xd5706415U
|
||||
#define MENU_LABEL_RDB_ENTRY_FAMITSU_MAGAZINE_RATING 0x01a50315U
|
||||
#define MENU_LABEL_RDB_ENTRY_RELEASE_MONTH 0xad2f2c54U
|
||||
#define MENU_LABEL_RDB_ENTRY_RELEASE_YEAR 0x14c9c6bfU
|
||||
#define MENU_LABEL_RDB_ENTRY_MAX_USERS 0xfae91cc4U
|
||||
|
||||
#define MENU_VALUE_INPUT_SETTINGS 0xddd30846U
|
||||
#define MENU_VALUE_HORIZONTAL_MENU 0x35761704U
|
||||
|
||||
|
@ -1401,26 +1401,32 @@ static int action_ok_video_resolution(const char *path,
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int is_rdb_entry(const char *label)
|
||||
static int is_rdb_entry(uint32_t hash)
|
||||
{
|
||||
return (
|
||||
!(strcmp(label, "rdb_entry_publisher")) ||
|
||||
!(strcmp(label, "rdb_entry_developer")) ||
|
||||
!(strcmp(label, "rdb_entry_origin")) ||
|
||||
!(strcmp(label, "rdb_entry_franchise")) ||
|
||||
!(strcmp(label, "rdb_entry_enhancement_hw")) ||
|
||||
!(strcmp(label, "rdb_entry_esrb_rating")) ||
|
||||
!(strcmp(label, "rdb_entry_bbfc_rating")) ||
|
||||
!(strcmp(label, "rdb_entry_elspa_rating")) ||
|
||||
!(strcmp(label, "rdb_entry_pegi_rating")) ||
|
||||
!(strcmp(label, "rdb_entry_cero_rating")) ||
|
||||
!(strcmp(label, "rdb_entry_edge_magazine_rating")) ||
|
||||
!(strcmp(label, "rdb_entry_edge_magazine_issue")) ||
|
||||
!(strcmp(label, "rdb_entry_famitsu_magazine_rating")) ||
|
||||
!(strcmp(label, "rdb_entry_releasemonth")) ||
|
||||
!(strcmp(label, "rdb_entry_releaseyear")) ||
|
||||
!(strcmp(label, "rdb_entry_max_users"))
|
||||
);
|
||||
switch (hash)
|
||||
{
|
||||
case MENU_LABEL_RDB_ENTRY_PUBLISHER:
|
||||
case MENU_LABEL_RDB_ENTRY_DEVELOPER:
|
||||
case MENU_LABEL_RDB_ENTRY_ORIGIN:
|
||||
case MENU_LABEL_RDB_ENTRY_FRANCHISE:
|
||||
case MENU_LABEL_RDB_ENTRY_ENHANCEMENT_HW:
|
||||
case MENU_LABEL_RDB_ENTRY_ESRB_RATING:
|
||||
case MENU_LABEL_RDB_ENTRY_BBFC_RATING:
|
||||
case MENU_LABEL_RDB_ENTRY_ELSPA_RATING:
|
||||
case MENU_LABEL_RDB_ENTRY_PEGI_RATING:
|
||||
case MENU_LABEL_RDB_ENTRY_CERO_RATING:
|
||||
case MENU_LABEL_RDB_ENTRY_EDGE_MAGAZINE_RATING:
|
||||
case MENU_LABEL_RDB_ENTRY_EDGE_MAGAZINE_ISSUE:
|
||||
case MENU_LABEL_RDB_ENTRY_FAMITSU_MAGAZINE_RATING:
|
||||
case MENU_LABEL_RDB_ENTRY_RELEASE_MONTH:
|
||||
case MENU_LABEL_RDB_ENTRY_RELEASE_YEAR:
|
||||
case MENU_LABEL_RDB_ENTRY_MAX_USERS:
|
||||
break;
|
||||
default:
|
||||
return -1;
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int menu_entries_cbs_init_bind_ok_compare_label(menu_file_list_cbs_t *cbs,
|
||||
@ -1715,7 +1721,7 @@ void menu_entries_cbs_init_bind_ok(menu_file_list_cbs_t *cbs,
|
||||
|
||||
cbs->action_ok = action_ok_lookup_setting;
|
||||
|
||||
if (elem0[0] != '\0' && is_rdb_entry(elem0))
|
||||
if (elem0[0] != '\0' && (is_rdb_entry(hash) == 0))
|
||||
{
|
||||
cbs->action_ok = action_ok_rdb_entry_submenu;
|
||||
return;
|
||||
|
Loading…
Reference in New Issue
Block a user