(Menu) Get rid of hardcoded enums for video/audio softplugs

This commit is contained in:
twinaphex 2014-09-03 03:34:14 +02:00
parent b68b4f13e6
commit b1fe41f087
6 changed files with 13 additions and 14 deletions

View File

@ -421,8 +421,8 @@ static void rgui_render(void)
#ifdef HAVE_OVERLAY
menu_type == MENU_SETTINGS_OVERLAY_PRESET ||
#endif
menu_type == MENU_SETTINGS_VIDEO_SOFTFILTER ||
menu_type == MENU_SETTINGS_AUDIO_DSP_FILTER ||
!strcmp(label, "video_filter") ||
!strcmp(label, "audio_dsp_plugin") ||
menu_type == MENU_SETTINGS_DISK_APPEND ||
menu_type_is == MENU_FILE_DIRECTORY)
{

View File

@ -290,8 +290,8 @@ static void rmenu_render(void)
#ifdef HAVE_OVERLAY
menu_type == MENU_SETTINGS_OVERLAY_PRESET ||
#endif
menu_type == MENU_SETTINGS_VIDEO_SOFTFILTER ||
menu_type == MENU_SETTINGS_AUDIO_DSP_FILTER ||
!strcmp(label, "video_filter") ||
!strcmp(label, "audio_dsp_plugin") ||
menu_type == MENU_SETTINGS_DISK_APPEND ||
menu_type_is == MENU_FILE_DIRECTORY)
{

View File

@ -507,8 +507,8 @@ static void rmenu_xui_render(void)
#ifdef HAVE_OVERLAY
menu_type == MENU_SETTINGS_OVERLAY_PRESET ||
#endif
menu_type == MENU_SETTINGS_VIDEO_SOFTFILTER ||
menu_type == MENU_SETTINGS_AUDIO_DSP_FILTER ||
!strcmp(label, "video_filter") ||
!strcmp(label, "audio_dsp_plugin") ||
menu_type == MENU_SETTINGS_DISK_APPEND ||
menu_type_is == MENU_FILE_DIRECTORY)
{

View File

@ -80,9 +80,9 @@ static void get_title(const char *label, const char *dir,
else if (menu_type == MENU_SETTINGS_OVERLAY_PRESET)
snprintf(title, sizeof_title, "OVERLAY %s", dir);
#endif
else if (menu_type == MENU_SETTINGS_VIDEO_SOFTFILTER)
else if (!strcmp(label, "video_filter"))
snprintf(title, sizeof_title, "FILTER %s", dir);
else if (menu_type == MENU_SETTINGS_AUDIO_DSP_FILTER)
else if (!strcmp(label, "audio_dsp_plugin"))
snprintf(title, sizeof_title, "DSP FILTER %s", dir);
else if (!strcmp(label, "rgui_browser_directory"))
snprintf(title, sizeof_title, "BROWSER DIR %s", dir);

View File

@ -88,7 +88,6 @@ typedef enum
MENU_SETTINGS_VIDEO_OPTIONS,
MENU_SETTINGS_VIDEO_RESOLUTION,
MENU_SETTINGS_CUSTOM_VIEWPORT,
MENU_SETTINGS_VIDEO_SOFTFILTER,
MENU_SETTINGS_FONT_OPTIONS,
MENU_SETTINGS_SHADER_OPTIONS,
MENU_SETTINGS_SHADER_FILTER,
@ -143,7 +142,6 @@ typedef enum
MENU_SYSTEM_DIR_PATH,
MENU_AUTOCONFIG_DIR_PATH,
MENU_EXTRACTION_DIR_PATH,
MENU_SETTINGS_AUDIO_DSP_FILTER,
MENU_SETTINGS_OVERLAY_PRESET,
MENU_SETTINGS_BIND_PLAYER,

View File

@ -262,7 +262,7 @@ int menu_entries_push_list(menu_handle_t *menu,
MENU_SETTINGS_VIDEO_RESOLUTION, 0);
#endif
add_setting_entry(menu,list,"video_viwidth", 0, setting_data);
add_setting_entry(menu,list,"video_filter", MENU_SETTINGS_VIDEO_SOFTFILTER, setting_data);
add_setting_entry(menu,list,"video_filter", 0, setting_data);
add_setting_entry(menu,list, "pal60_enable", 0, setting_data);
add_setting_entry(menu,list,"video_smooth", 0, setting_data);
add_setting_entry(menu,list, "soft_filter", 0, setting_data);
@ -514,7 +514,7 @@ int menu_entries_push_list(menu_handle_t *menu,
break;
case MENU_SETTINGS_AUDIO_OPTIONS:
file_list_clear(list);
add_setting_entry(menu,list,"audio_dsp_plugin", MENU_SETTINGS_AUDIO_DSP_FILTER, setting_data);
add_setting_entry(menu,list,"audio_dsp_plugin", 0, setting_data);
add_setting_entry(menu,list,"audio_enable", 0, setting_data);
add_setting_entry(menu,list,"audio_mute", 0, setting_data);
add_setting_entry(menu,list,"audio_latency", 0, setting_data);
@ -571,13 +571,14 @@ int menu_entries_push_list(menu_handle_t *menu,
int menu_parse_check(const char *label, unsigned menu_type)
{
RARCH_LOG("label is menu_parse_check: %s\n", label);
if (!((menu_type == MENU_FILE_DIRECTORY ||
menu_common_type_is(menu_type) == MENU_SETTINGS_SHADER_OPTIONS ||
menu_common_type_is(menu_type) == MENU_FILE_DIRECTORY ||
menu_type == MENU_SETTINGS_OVERLAY_PRESET ||
menu_type == MENU_CONTENT_HISTORY_PATH ||
menu_type == MENU_SETTINGS_VIDEO_SOFTFILTER ||
menu_type == MENU_SETTINGS_AUDIO_DSP_FILTER ||
!strcmp(label, "video_filter") ||
!strcmp(label, "audio_dsp_plugin") ||
menu_type == MENU_SETTINGS_CORE ||
menu_type == MENU_SETTINGS_CONFIG ||
menu_type == MENU_SETTINGS_DISK_APPEND)))