diff --git a/intl/msg_hash_us.c b/intl/msg_hash_us.c index 7b2c063f26..008c94c3f7 100644 --- a/intl/msg_hash_us.c +++ b/intl/msg_hash_us.c @@ -3034,6 +3034,8 @@ const char *msg_hash_to_str_us(enum msg_hash_enums msg) switch (msg) { + case MENU_ENUM_SUBLABEL_CONFIG_SAVE_ON_EXIT: + return "Saves changes to configuration file on exit."; case MENU_ENUM_SUBLABEL_VIDEO_HARD_SYNC_FRAMES: return "Sets how many frames the CPU can run ahead of the GPU when using 'Hard GPU Sync'."; case MENU_ENUM_SUBLABEL_VIDEO_REFRESH_RATE_AUTO: diff --git a/menu/cbs/menu_cbs_sublabel.c b/menu/cbs/menu_cbs_sublabel.c index f8c7725c87..10a5546c54 100644 --- a/menu/cbs/menu_cbs_sublabel.c +++ b/menu/cbs/menu_cbs_sublabel.c @@ -260,6 +260,16 @@ static int action_bind_sublabel_video_threaded( return 0; } +static int action_bind_sublabel_config_save_on_exit( + 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_CONFIG_SAVE_ON_EXIT), 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) { @@ -272,6 +282,9 @@ int menu_cbs_init_bind_sublabel(menu_file_list_cbs_t *cbs, { switch (cbs->enum_idx) { + case MENU_ENUM_LABEL_CONFIG_SAVE_ON_EXIT: + BIND_ACTION_SUBLABEL(cbs, action_bind_sublabel_config_save_on_exit); + break; case MENU_ENUM_LABEL_VIDEO_THREADED: BIND_ACTION_SUBLABEL(cbs, action_bind_sublabel_video_threaded); break; diff --git a/msg_hash.h b/msg_hash.h index 5bf629a2b2..23cc34c458 100644 --- a/msg_hash.h +++ b/msg_hash.h @@ -1878,7 +1878,8 @@ enum msg_hash_enums MENU_ENUM_SUBLABEL_NETPLAY, MENU_ENUM_SUBLABEL_MENU_SETTINGS, MENU_ENUM_SUBLABEL_VIDEO_HARD_SYNC, - MENU_ENUM_SUBLABEL_VIDEO_THREADED + MENU_ENUM_SUBLABEL_VIDEO_THREADED, + MENU_ENUM_SUBLABEL_CONFIG_SAVE_ON_EXIT };