From 3291f4023899fd62e6e2d0c3a46bea935fc8ec7c Mon Sep 17 00:00:00 2001 From: twinaphex Date: Sun, 21 Jun 2015 09:12:16 +0200 Subject: [PATCH] Hide 'Recording Settings' if recording driver set to NULL --- menu/menu_setting.c | 54 +++++++++++++++++++++++++-------------------- 1 file changed, 30 insertions(+), 24 deletions(-) diff --git a/menu/menu_setting.c b/menu/menu_setting.c index af4de19f1f..c8cefc10b9 100644 --- a/menu/menu_setting.c +++ b/menu/menu_setting.c @@ -6956,31 +6956,37 @@ static bool setting_append_list_privacy_options( START_SUB_GROUP(list, list_info, "State", group_info.name, subgroup_info, parent_group); - CONFIG_BOOL( - settings->camera.allow, - menu_hash_to_str(MENU_LABEL_CAMERA_ALLOW), - menu_hash_to_str(MENU_LABEL_VALUE_CAMERA_ALLOW), - false, - menu_hash_to_str(MENU_VALUE_OFF), - menu_hash_to_str(MENU_VALUE_ON), - group_info.name, - subgroup_info.name, - parent_group, - general_write_handler, - general_read_handler); + if (strcmp(settings->record.driver, "null") != 0) + { + CONFIG_BOOL( + settings->camera.allow, + menu_hash_to_str(MENU_LABEL_CAMERA_ALLOW), + menu_hash_to_str(MENU_LABEL_VALUE_CAMERA_ALLOW), + false, + menu_hash_to_str(MENU_VALUE_OFF), + menu_hash_to_str(MENU_VALUE_ON), + group_info.name, + subgroup_info.name, + parent_group, + general_write_handler, + general_read_handler); + } - CONFIG_BOOL( - settings->location.allow, - menu_hash_to_str(MENU_LABEL_LOCATION_ALLOW), - menu_hash_to_str(MENU_LABEL_VALUE_LOCATION_ALLOW), - false, - menu_hash_to_str(MENU_VALUE_OFF), - menu_hash_to_str(MENU_VALUE_ON), - group_info.name, - subgroup_info.name, - parent_group, - general_write_handler, - general_read_handler); + if (strcmp(settings->location.driver, "null") != 0) + { + CONFIG_BOOL( + settings->location.allow, + menu_hash_to_str(MENU_LABEL_LOCATION_ALLOW), + menu_hash_to_str(MENU_LABEL_VALUE_LOCATION_ALLOW), + false, + menu_hash_to_str(MENU_VALUE_OFF), + menu_hash_to_str(MENU_VALUE_ON), + group_info.name, + subgroup_info.name, + parent_group, + general_write_handler, + general_read_handler); + } END_SUB_GROUP(list, list_info, parent_group); END_GROUP(list, list_info, parent_group);