This commit is contained in:
twinaphex 2016-07-02 06:57:47 +02:00
parent eadae793c6
commit 03f7bd5e7b
3 changed files with 5 additions and 36 deletions

View File

@ -322,8 +322,7 @@ static int action_start_lookup_setting(unsigned type, const char *label)
return menu_setting_set(type, label, MENU_ACTION_START, false); return menu_setting_set(type, label, MENU_ACTION_START, false);
} }
static int menu_cbs_init_bind_start_compare_label(menu_file_list_cbs_t *cbs, static int menu_cbs_init_bind_start_compare_label(menu_file_list_cbs_t *cbs)
uint32_t hash)
{ {
if (cbs->enum_idx != MSG_UNKNOWN) if (cbs->enum_idx != MSG_UNKNOWN)
{ {
@ -356,34 +355,6 @@ static int menu_cbs_init_bind_start_compare_label(menu_file_list_cbs_t *cbs,
return -1; return -1;
} }
} }
else
{
switch (hash)
{
case MENU_LABEL_REMAP_FILE_LOAD:
BIND_ACTION_START(cbs, action_start_remap_file_load);
break;
case MENU_LABEL_VIDEO_FILTER:
BIND_ACTION_START(cbs, action_start_video_filter_file_load);
break;
case MENU_LABEL_VIDEO_SHADER_PASS:
BIND_ACTION_START(cbs, action_start_shader_pass);
break;
case MENU_LABEL_VIDEO_SHADER_SCALE_PASS:
BIND_ACTION_START(cbs, action_start_shader_scale_pass);
break;
case MENU_LABEL_VIDEO_SHADER_FILTER_PASS:
BIND_ACTION_START(cbs, action_start_shader_filter_pass);
break;
case MENU_LABEL_VIDEO_SHADER_NUM_PASSES:
BIND_ACTION_START(cbs, action_start_shader_num_passes);
break;
case MENU_LABEL_SCREEN_RESOLUTION:
BIND_ACTION_START(cbs, action_start_video_resolution);
default:
return -1;
}
}
return 0; return 0;
} }
@ -435,15 +406,14 @@ static int menu_cbs_init_bind_start_compare_type(menu_file_list_cbs_t *cbs,
} }
int menu_cbs_init_bind_start(menu_file_list_cbs_t *cbs, int menu_cbs_init_bind_start(menu_file_list_cbs_t *cbs,
const char *path, const char *label, unsigned type, size_t idx, const char *path, const char *label, unsigned type, size_t idx)
uint32_t label_hash)
{ {
if (!cbs) if (!cbs)
return -1; return -1;
BIND_ACTION_START(cbs, action_start_lookup_setting); BIND_ACTION_START(cbs, action_start_lookup_setting);
if (menu_cbs_init_bind_start_compare_label(cbs, label_hash) == 0) if (menu_cbs_init_bind_start_compare_label(cbs) == 0)
return 0; return 0;
if (menu_cbs_init_bind_start_compare_type(cbs, type) == 0) if (menu_cbs_init_bind_start_compare_type(cbs, type) == 0)

View File

@ -78,7 +78,7 @@ void menu_cbs_init(void *data,
menu_cbs_init_log(repr_label, "SCAN", cbs->action_scan_ident); menu_cbs_init_log(repr_label, "SCAN", cbs->action_scan_ident);
menu_cbs_init_bind_start(cbs, path, label, type, idx, label_hash); menu_cbs_init_bind_start(cbs, path, label, type, idx);
menu_cbs_init_log(repr_label, "START", cbs->action_start_ident); menu_cbs_init_log(repr_label, "START", cbs->action_start_ident);

View File

@ -144,8 +144,7 @@ int menu_cbs_init_bind_info(menu_file_list_cbs_t *cbs,
const char *path, const char *label, unsigned type, size_t idx); const char *path, const char *label, unsigned type, size_t idx);
int menu_cbs_init_bind_start(menu_file_list_cbs_t *cbs, int menu_cbs_init_bind_start(menu_file_list_cbs_t *cbs,
const char *path, const char *label, unsigned type, size_t idx, const char *path, const char *label, unsigned type, size_t idx);
uint32_t label_hash);
int menu_cbs_init_bind_content_list_switch(menu_file_list_cbs_t *cbs, int menu_cbs_init_bind_content_list_switch(menu_file_list_cbs_t *cbs,
const char *path, const char *label, unsigned type, size_t idx); const char *path, const char *label, unsigned type, size_t idx);