mirror of
https://github.com/CTCaer/RetroArch.git
synced 2025-01-10 13:02:27 +00:00
(menu_entries_cbs_right.c) Cleanups
This commit is contained in:
parent
55ff3d8355
commit
3a769f4779
@ -14,6 +14,8 @@
|
||||
*/
|
||||
|
||||
#include <file/file_path.h>
|
||||
#include <rhash.h>
|
||||
|
||||
#include "menu.h"
|
||||
#include "menu_entries_cbs.h"
|
||||
#include "menu_setting.h"
|
||||
@ -356,6 +358,8 @@ void menu_entries_cbs_init_bind_right(menu_file_list_cbs_t *cbs,
|
||||
const char *elem0, const char *elem1, const char *menu_label)
|
||||
{
|
||||
int i;
|
||||
uint32_t hash = djb2_calculate(label);
|
||||
uint32_t menu_label_hash = djb2_calculate(menu_label);
|
||||
|
||||
if (!cbs)
|
||||
return;
|
||||
@ -396,12 +400,16 @@ void menu_entries_cbs_init_bind_right(menu_file_list_cbs_t *cbs,
|
||||
case MENU_FILE_CHEAT:
|
||||
case MENU_FILE_REMAP:
|
||||
case MENU_SETTING_GROUP:
|
||||
if (!strcmp(menu_label, "Horizontal Menu")
|
||||
|| !strcmp(menu_label, "Main Menu"))
|
||||
cbs->action_right = action_right_mainmenu;
|
||||
else
|
||||
cbs->action_right = action_right_scroll;
|
||||
break;
|
||||
switch (menu_label_hash)
|
||||
{
|
||||
case MENU_VALUE_HORIZONTAL_MENU:
|
||||
case MENU_VALUE_MAIN_MENU:
|
||||
cbs->action_right = action_right_mainmenu;
|
||||
break;
|
||||
default:
|
||||
cbs->action_right = action_right_scroll;
|
||||
break;
|
||||
}
|
||||
case MENU_SETTING_ACTION:
|
||||
case MENU_FILE_CONTENTLIST_ENTRY:
|
||||
cbs->action_right = action_right_mainmenu;
|
||||
@ -423,23 +431,35 @@ void menu_entries_cbs_init_bind_right(menu_file_list_cbs_t *cbs,
|
||||
else if (type >= MENU_SETTINGS_INPUT_DESC_BEGIN
|
||||
&& type <= MENU_SETTINGS_INPUT_DESC_END)
|
||||
cbs->action_right = action_right_input_desc;
|
||||
else if (!strcmp(label, "savestate") ||
|
||||
!strcmp(label, "loadstate"))
|
||||
cbs->action_right = action_right_save_state;
|
||||
else if (!strcmp(label, "video_shader_scale_pass"))
|
||||
cbs->action_right = action_right_shader_scale_pass;
|
||||
else if (!strcmp(label, "video_shader_filter_pass"))
|
||||
cbs->action_right = action_right_shader_filter_pass;
|
||||
else if (!strcmp(label, "video_shader_default_filter"))
|
||||
cbs->action_right = action_right_shader_filter_default;
|
||||
else if (!strcmp(label, "video_shader_num_passes"))
|
||||
cbs->action_right = action_right_shader_num_passes;
|
||||
else if (!strcmp(label, "cheat_num_passes"))
|
||||
cbs->action_right = action_right_cheat_num_passes;
|
||||
else if (type == MENU_SETTINGS_VIDEO_RESOLUTION)
|
||||
cbs->action_right = action_right_video_resolution;
|
||||
else if ((type >= MENU_SETTINGS_CORE_OPTION_START))
|
||||
cbs->action_right = core_setting_right;
|
||||
else
|
||||
{
|
||||
switch (hash)
|
||||
{
|
||||
case MENU_LABEL_SAVESTATE:
|
||||
case MENU_LABEL_LOADSTATE:
|
||||
cbs->action_right = action_right_save_state;
|
||||
break;
|
||||
case MENU_LABEL_VIDEO_SHADER_SCALE_PASS:
|
||||
cbs->action_right = action_right_shader_scale_pass;
|
||||
break;
|
||||
case MENU_LABEL_VIDEO_SHADER_FILTER_PASS:
|
||||
cbs->action_right = action_right_shader_filter_pass;
|
||||
break;
|
||||
case MENU_LABEL_VIDEO_SHADER_DEFAULT_FILTER:
|
||||
cbs->action_right = action_right_shader_filter_default;
|
||||
break;
|
||||
case MENU_LABEL_VIDEO_SHADER_NUM_PASSES:
|
||||
cbs->action_right = action_right_shader_num_passes;
|
||||
break;
|
||||
case MENU_LABEL_CHEAT_NUM_PASSES:
|
||||
cbs->action_right = action_right_cheat_num_passes;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
for (i = 0; i < MAX_USERS; i++)
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user