diff --git a/intl/msg_hash_us.h b/intl/msg_hash_us.h index eac1360242..89875d6de5 100644 --- a/intl/msg_hash_us.h +++ b/intl/msg_hash_us.h @@ -2068,3 +2068,11 @@ MSG_HASH( MENU_ENUM_SUBLABEL_AUDIO_RATE_CONTROL_DELTA, "Helps smooth out imperfections in timing when synchronizing audio and video at the same time. Be aware that if disabled, proper synchronization is nearly impossible to obtain." ) +MSG_HASH( + MENU_ENUM_SUBLABEL_CAMERA_ALLOW, + "Allow or disallow camera access by cores." + ) +MSG_HASH( + MENU_ENUM_SUBLABEL_LOCATION_ALLOW, + "Allow or disallow location services access by cores." + ) diff --git a/menu/cbs/menu_cbs_sublabel.c b/menu/cbs/menu_cbs_sublabel.c index dbd1f31049..cb61ed2684 100644 --- a/menu/cbs/menu_cbs_sublabel.c +++ b/menu/cbs/menu_cbs_sublabel.c @@ -468,6 +468,28 @@ static int action_bind_sublabel_audio_mute( return 0; } +static int action_bind_sublabel_camera_allow( + file_list_t *list, + unsigned type, unsigned i, + const char *label, const char *path, + char *s, size_t len) +{ + + strlcpy(s, msg_hash_to_str(MENU_ENUM_SUBLABEL_CAMERA_ALLOW), len); + return 0; +} + +static int action_bind_sublabel_location_allow( + file_list_t *list, + unsigned type, unsigned i, + const char *label, const char *path, + char *s, size_t len) +{ + + strlcpy(s, msg_hash_to_str(MENU_ENUM_SUBLABEL_LOCATION_ALLOW), len); + return 0; +} + int menu_cbs_init_bind_sublabel(menu_file_list_cbs_t *cbs, const char *path, const char *label, unsigned type, size_t idx) { @@ -480,6 +502,12 @@ int menu_cbs_init_bind_sublabel(menu_file_list_cbs_t *cbs, { switch (cbs->enum_idx) { + case MENU_ENUM_LABEL_LOCATION_ALLOW: + BIND_ACTION_SUBLABEL(cbs, action_bind_sublabel_location_allow); + break; + case MENU_ENUM_LABEL_CAMERA_ALLOW: + BIND_ACTION_SUBLABEL(cbs, action_bind_sublabel_camera_allow); + break; case MENU_ENUM_LABEL_AUDIO_RATE_CONTROL_DELTA: BIND_ACTION_SUBLABEL(cbs, action_bind_sublabel_audio_rate_control_delta); break; diff --git a/msg_hash.h b/msg_hash.h index fa3d51b39c..34dd4da78c 100644 --- a/msg_hash.h +++ b/msg_hash.h @@ -1344,9 +1344,11 @@ enum msg_hash_enums /* Privacy settings */ MENU_ENUM_LABEL_CAMERA_ALLOW, - MENU_ENUM_LABEL_LOCATION_ALLOW, - + MENU_ENUM_SUBLABEL_CAMERA_ALLOW, MENU_ENUM_LABEL_VALUE_CAMERA_ALLOW, + + MENU_ENUM_LABEL_LOCATION_ALLOW, + MENU_ENUM_SUBLABEL_LOCATION_ALLOW, MENU_ENUM_LABEL_VALUE_LOCATION_ALLOW,