diff --git a/menu/cbs/menu_cbs_deferred_push.c b/menu/cbs/menu_cbs_deferred_push.c index ba2867f90e..4c26d96c8a 100644 --- a/menu/cbs/menu_cbs_deferred_push.c +++ b/menu/cbs/menu_cbs_deferred_push.c @@ -669,7 +669,7 @@ static int menu_cbs_init_bind_deferred_push_compare_label( int (*cb)(menu_displaylist_info_t *info); } deferred_info_list_t; - const deferred_info_list_t info_list[] = { + static const deferred_info_list_t info_list[] = { {MENU_ENUM_LABEL_DEFERRED_DUMP_DISC_LIST, deferred_push_dump_disk_list}, #ifdef HAVE_LAKKA {MENU_ENUM_LABEL_DEFERRED_EJECT_DISC, deferred_push_eject_disc}, diff --git a/menu/cbs/menu_cbs_get_value.c b/menu/cbs/menu_cbs_get_value.c index 9a8c532272..b97d0b4044 100644 --- a/menu/cbs/menu_cbs_get_value.c +++ b/menu/cbs/menu_cbs_get_value.c @@ -2123,7 +2123,7 @@ static int menu_cbs_init_bind_get_string_representation_compare_type( char *s2, size_t len2); } info_range_list_t; - info_range_list_t info_list[] = { + static const info_range_list_t info_list[] = { #ifdef HAVE_AUDIOMIXER { MENU_SETTINGS_AUDIO_MIXER_STREAM_BEGIN, diff --git a/menu/cbs/menu_cbs_ok.c b/menu/cbs/menu_cbs_ok.c index a008aec103..05f28880cc 100644 --- a/menu/cbs/menu_cbs_ok.c +++ b/menu/cbs/menu_cbs_ok.c @@ -8998,7 +8998,7 @@ static int menu_cbs_init_bind_ok_compare_label(menu_file_list_cbs_t *cbs, size_t idx, size_t entry_idx); } temp_ok_list_t; - temp_ok_list_t ok_list[] = { + static const temp_ok_list_t ok_list[] = { {MENU_ENUM_LABEL_QUICK_MENU_START_RECORDING, action_ok_start_recording}, {MENU_ENUM_LABEL_QUICK_MENU_START_STREAMING, action_ok_start_streaming}, {MENU_ENUM_LABEL_QUICK_MENU_STOP_RECORDING, action_ok_stop_recording}, @@ -9380,7 +9380,7 @@ static int menu_cbs_init_bind_ok_compare_label(menu_file_list_cbs_t *cbs, size_t idx, size_t entry_idx); } temp_ok_list_t; - temp_ok_list_t ok_list[] = { + static const temp_ok_list_t ok_list[] = { {MENU_ENUM_LABEL_OPEN_ARCHIVE_DETECT_CORE, action_ok_open_archive_detect_core}, {MENU_ENUM_LABEL_OPEN_ARCHIVE, action_ok_open_archive}, {MENU_ENUM_LABEL_LOAD_ARCHIVE_DETECT_CORE, action_ok_load_archive_detect_core}, diff --git a/menu/cbs/menu_cbs_sublabel.c b/menu/cbs/menu_cbs_sublabel.c index b9b101af52..56462e8d0b 100644 --- a/menu/cbs/menu_cbs_sublabel.c +++ b/menu/cbs/menu_cbs_sublabel.c @@ -2199,7 +2199,7 @@ int menu_cbs_init_bind_sublabel(menu_file_list_cbs_t *cbs, char *s, size_t len); } info_range_list_t; - info_range_list_t info_list[] = { + static const info_range_list_t info_list[] = { { MENU_SETTINGS_INPUT_DESC_KBD_BEGIN, MENU_SETTINGS_INPUT_DESC_KBD_END, @@ -5781,7 +5781,7 @@ int menu_cbs_init_bind_sublabel(menu_file_list_cbs_t *cbs, } info_single_list_t; /* Entries with %u player index placeholder. */ - info_single_list_t info_list[] = { + static const info_single_list_t info_list[] = { #if 0 { MENU_ENUM_LABEL_INPUT_LIBRETRO_DEVICE, diff --git a/menu/cbs/menu_cbs_title.c b/menu/cbs/menu_cbs_title.c index f46e68976f..f539c2179e 100644 --- a/menu/cbs/menu_cbs_title.c +++ b/menu/cbs/menu_cbs_title.c @@ -907,7 +907,7 @@ static int action_get_title_group_settings(const char *path, const char *label, /* Note: MENU_ENUM_LABEL_HORIZONTAL_MENU *is* a playlist * tab, but its actual title is set elsewhere - so treat * it as a generic top-level item */ - title_info_list_t info_list[] = { + static const title_info_list_t info_list[] = { {MENU_ENUM_LABEL_MAIN_MENU, MENU_ENUM_LABEL_VALUE_MAIN_MENU, false }, {MENU_ENUM_LABEL_HISTORY_TAB, MENU_ENUM_LABEL_VALUE_HISTORY_TAB, true }, {MENU_ENUM_LABEL_FAVORITES_TAB, MENU_ENUM_LABEL_VALUE_FAVORITES_TAB, true }, @@ -978,7 +978,7 @@ static int menu_cbs_init_bind_title_compare_label(menu_file_list_cbs_t *cbs, unsigned type, char *s, size_t len); } title_info_list_t; - title_info_list_t info_list[] = { + static const title_info_list_t info_list[] = { {MENU_ENUM_LABEL_DEFERRED_REMAPPINGS_PORT_LIST, action_get_title_remap_port}, {MENU_ENUM_LABEL_DEFERRED_CORE_SETTINGS_LIST, action_get_core_settings_list}, {MENU_ENUM_LABEL_DEFERRED_CORE_INFORMATION_LIST, action_get_core_information_list}, @@ -1812,7 +1812,7 @@ int menu_cbs_init_bind_title(menu_file_list_cbs_t *cbs, unsigned type, char *s, size_t len); } title_info_list_t; - title_info_list_t info_list[] = { + static const title_info_list_t info_list[] = { #ifdef HAVE_AUDIOMIXER {MENU_ENUM_LABEL_DEFERRED_MIXER_STREAM_SETTINGS_LIST, action_get_title_mixer_stream_actions}, #endif diff --git a/menu/menu_displaylist.c b/menu/menu_displaylist.c index 5749f52e2f..1e11dcb200 100644 --- a/menu/menu_displaylist.c +++ b/menu/menu_displaylist.c @@ -2268,7 +2268,7 @@ static unsigned menu_displaylist_parse_system_info(file_list_t *list) /* Supports %s: yes/no */ { - struct menu_features_info + static const struct menu_features_info { bool enabled; enum msg_hash_enums msg; @@ -7391,7 +7391,7 @@ unsigned menu_displaylist_build_list( break; case DISPLAYLIST_INPUT_TURBO_FIRE_SETTINGS_LIST: { - menu_displaylist_build_info_t build_list[] = { + static const menu_displaylist_build_info_t build_list[] = { {MENU_ENUM_LABEL_INPUT_TURBO_ENABLE, PARSE_ONLY_BOOL}, {MENU_ENUM_LABEL_INPUT_TURBO_MODE, PARSE_ONLY_UINT}, {MENU_ENUM_LABEL_INPUT_TURBO_BIND, PARSE_ONLY_INT}, @@ -9195,7 +9195,7 @@ unsigned menu_displaylist_build_list( #ifdef HAVE_CHEATS { char cheat_label[64]; - menu_displaylist_build_info_t build_list[] = { + static const menu_displaylist_build_info_t build_list[] = { {MENU_ENUM_LABEL_CHEAT_START_OR_RESTART, PARSE_ONLY_UINT }, {MENU_ENUM_LABEL_CHEAT_BIG_ENDIAN, PARSE_ONLY_BOOL }, {MENU_ENUM_LABEL_CHEAT_SEARCH_EXACT, PARSE_ONLY_UINT }, @@ -9298,7 +9298,7 @@ unsigned menu_displaylist_build_list( } { - menu_displaylist_build_info_t build_list[] = { + static const menu_displaylist_build_info_t build_list[] = { {MENU_ENUM_LABEL_CHEAT_IDX, PARSE_ONLY_UINT }, {MENU_ENUM_LABEL_CHEAT_STATE, PARSE_ONLY_BOOL }, {MENU_ENUM_LABEL_CHEAT_DESC, PARSE_ONLY_STRING}, @@ -9323,7 +9323,7 @@ unsigned menu_displaylist_build_list( } else { - menu_displaylist_build_info_t build_list[] = { + static const menu_displaylist_build_info_t build_list[] = { {MENU_ENUM_LABEL_CHEAT_MEMORY_SEARCH_SIZE, PARSE_ONLY_UINT }, {MENU_ENUM_LABEL_CHEAT_TYPE, PARSE_ONLY_UINT }, {MENU_ENUM_LABEL_CHEAT_VALUE, PARSE_ONLY_UINT }, @@ -9428,7 +9428,7 @@ unsigned menu_displaylist_build_list( break; case DISPLAYLIST_ACCOUNTS_YOUTUBE_LIST: { - menu_displaylist_build_info_t build_list[] = { + static const menu_displaylist_build_info_t build_list[] = { {MENU_ENUM_LABEL_YOUTUBE_STREAM_KEY, PARSE_ONLY_STRING}, }; @@ -9693,7 +9693,7 @@ unsigned menu_displaylist_build_list( break; case DISPLAYLIST_MIDI_SETTINGS_LIST: { - menu_displaylist_build_info_t build_list[] = { + static const menu_displaylist_build_info_t build_list[] = { {MENU_ENUM_LABEL_MIDI_OUTPUT, PARSE_ONLY_STRING}, {MENU_ENUM_LABEL_MIDI_INPUT, PARSE_ONLY_STRING}, {MENU_ENUM_LABEL_MIDI_VOLUME, PARSE_ONLY_UINT }, @@ -10147,7 +10147,7 @@ unsigned menu_displaylist_build_list( break; case DISPLAYLIST_CRT_SWITCHRES_SETTINGS_LIST: { - menu_displaylist_build_info_t build_list[] = { + static const menu_displaylist_build_info_t build_list[] = { {MENU_ENUM_LABEL_CRT_SWITCH_RESOLUTION, PARSE_ONLY_UINT}, {MENU_ENUM_LABEL_CRT_SWITCH_RESOLUTION_SUPER, PARSE_ONLY_UINT}, {MENU_ENUM_LABEL_CRT_SWITCH_X_AXIS_CENTERING, PARSE_ONLY_INT }, @@ -10169,7 +10169,7 @@ unsigned menu_displaylist_build_list( #ifdef HAVE_LAKKA case DISPLAYLIST_LAKKA_SERVICES_LIST: { - menu_displaylist_build_info_t build_list[] = { + static const menu_displaylist_build_info_t build_list[] = { {MENU_ENUM_LABEL_SSH_ENABLE, PARSE_ONLY_BOOL}, {MENU_ENUM_LABEL_SAMBA_ENABLE, PARSE_ONLY_BOOL}, {MENU_ENUM_LABEL_BLUETOOTH_ENABLE, PARSE_ONLY_BOOL}, @@ -10190,7 +10190,7 @@ unsigned menu_displaylist_build_list( #ifdef HAVE_LAKKA_SWITCH case DISPLAYLIST_LAKKA_SWITCH_OPTIONS_LIST: { - menu_displaylist_build_info_t build_list[] = { + static const menu_displaylist_build_info_t build_list[] = { {MENU_ENUM_LABEL_SWITCH_OC_ENABLE, PARSE_ONLY_BOOL}, {MENU_ENUM_LABEL_SWITCH_CEC_ENABLE, PARSE_ONLY_BOOL}, {MENU_ENUM_LABEL_BLUETOOTH_ERTM_DISABLE, PARSE_ONLY_BOOL}, @@ -10276,7 +10276,7 @@ unsigned menu_displaylist_build_list( break; case DISPLAYLIST_MENU_FILE_BROWSER_SETTINGS_LIST: { - menu_displaylist_build_info_t build_list[] = { + static const menu_displaylist_build_info_t build_list[] = { {MENU_ENUM_LABEL_RGUI_BROWSER_DIRECTORY, PARSE_ONLY_DIR}, {MENU_ENUM_LABEL_CACHE_DIRECTORY, PARSE_ONLY_DIR}, {MENU_ENUM_LABEL_SHOW_HIDDEN_FILES, PARSE_ONLY_BOOL}, @@ -10299,7 +10299,7 @@ unsigned menu_displaylist_build_list( break; case DISPLAYLIST_ACCOUNTS_LIST: { - menu_displaylist_build_info_t build_list[] = { + static const menu_displaylist_build_info_t build_list[] = { {MENU_ENUM_LABEL_ACCOUNTS_RETRO_ACHIEVEMENTS, PARSE_ACTION}, {MENU_ENUM_LABEL_ACCOUNTS_YOUTUBE, PARSE_ACTION}, {MENU_ENUM_LABEL_ACCOUNTS_TWITCH, PARSE_ACTION}, @@ -10317,7 +10317,7 @@ unsigned menu_displaylist_build_list( break; case DISPLAYLIST_ACCOUNTS_CHEEVOS_LIST: { - menu_displaylist_build_info_t build_list[] = { + static const menu_displaylist_build_info_t build_list[] = { {MENU_ENUM_LABEL_CHEEVOS_USERNAME, PARSE_ONLY_STRING}, {MENU_ENUM_LABEL_CHEEVOS_PASSWORD, PARSE_ONLY_STRING}, }; @@ -10916,7 +10916,7 @@ unsigned menu_displaylist_build_list( } case DISPLAYLIST_PRIVACY_SETTINGS_LIST: { - menu_displaylist_build_info_t build_list[] = { + static const menu_displaylist_build_info_t build_list[] = { {MENU_ENUM_LABEL_CAMERA_ALLOW, PARSE_ONLY_BOOL}, {MENU_ENUM_LABEL_DISCORD_ALLOW, PARSE_ONLY_BOOL}, {MENU_ENUM_LABEL_LOCATION_ALLOW, PARSE_ONLY_BOOL}, @@ -11192,7 +11192,7 @@ unsigned menu_displaylist_build_list( break; case DISPLAYLIST_POWER_MANAGEMENT_SETTINGS_LIST: { - menu_displaylist_build_info_t build_list[] = { + static const menu_displaylist_build_info_t build_list[] = { {MENU_ENUM_LABEL_FASTFORWARD_FRAMESKIP, PARSE_ONLY_BOOL}, {MENU_ENUM_LABEL_SUSTAINED_PERFORMANCE_MODE, PARSE_ONLY_BOOL}, {MENU_ENUM_LABEL_CPU_PERFPOWER, PARSE_ACTION}, @@ -11226,7 +11226,7 @@ unsigned menu_displaylist_build_list( case DISPLAYLIST_ONSCREEN_DISPLAY_SETTINGS_LIST: { /* Not used */ - menu_displaylist_build_info_t build_list[] = { + static const menu_displaylist_build_info_t build_list[] = { {MENU_ENUM_LABEL_ONSCREEN_NOTIFICATIONS_SETTINGS, PARSE_ACTION}, #if defined(HAVE_OVERLAY) {MENU_ENUM_LABEL_ONSCREEN_OVERLAY_SETTINGS, PARSE_ACTION}, @@ -11244,7 +11244,7 @@ unsigned menu_displaylist_build_list( break; case DISPLAYLIST_USER_SETTINGS_LIST: { - menu_displaylist_build_info_t build_list[] = { + static const menu_displaylist_build_info_t build_list[] = { {MENU_ENUM_LABEL_PRIVACY_SETTINGS, PARSE_ACTION}, {MENU_ENUM_LABEL_ACCOUNTS_LIST, PARSE_ACTION}, {MENU_ENUM_LABEL_NETPLAY_NICKNAME, PARSE_ONLY_STRING}, @@ -11261,7 +11261,7 @@ unsigned menu_displaylist_build_list( break; case DISPLAYLIST_UPDATER_SETTINGS_LIST: { - menu_displaylist_build_info_t build_list[] = { + static const menu_displaylist_build_info_t build_list[] = { {MENU_ENUM_LABEL_CORE_UPDATER_BUILDBOT_URL, PARSE_ONLY_STRING}, {MENU_ENUM_LABEL_BUILDBOT_ASSETS_URL, PARSE_ONLY_STRING}, {MENU_ENUM_LABEL_CORE_UPDATER_AUTO_EXTRACT_ARCHIVE, PARSE_ONLY_BOOL}, @@ -11281,7 +11281,7 @@ unsigned menu_displaylist_build_list( break; case DISPLAYLIST_MENU_SOUNDS_LIST: { - menu_displaylist_build_info_t build_list[] = { + static const menu_displaylist_build_info_t build_list[] = { {MENU_ENUM_LABEL_AUDIO_ENABLE_MENU, PARSE_ONLY_BOOL}, {MENU_ENUM_LABEL_MENU_SOUND_OK, PARSE_ONLY_BOOL}, {MENU_ENUM_LABEL_MENU_SOUND_CANCEL, PARSE_ONLY_BOOL}, @@ -11301,7 +11301,7 @@ unsigned menu_displaylist_build_list( break; case DISPLAYLIST_SETTINGS_VIEWS_SETTINGS_LIST: { - menu_displaylist_build_info_t build_list[] = { + static const menu_displaylist_build_info_t build_list[] = { {MENU_ENUM_LABEL_SETTINGS_SHOW_USER_INTERFACE, PARSE_ONLY_BOOL}, {MENU_ENUM_LABEL_SETTINGS_SHOW_ONSCREEN_DISPLAY, PARSE_ONLY_BOOL}, {MENU_ENUM_LABEL_SETTINGS_SHOW_FILE_BROWSER, PARSE_ONLY_BOOL}, @@ -11346,7 +11346,7 @@ unsigned menu_displaylist_build_list( break; case DISPLAYLIST_QUICK_MENU_VIEWS_SETTINGS_LIST: { - menu_displaylist_build_info_t build_list[] = { + static const menu_displaylist_build_info_t build_list[] = { {MENU_ENUM_LABEL_QUICK_MENU_SHOW_RESUME_CONTENT, PARSE_ONLY_BOOL}, {MENU_ENUM_LABEL_QUICK_MENU_SHOW_RESTART_CONTENT, PARSE_ONLY_BOOL}, {MENU_ENUM_LABEL_QUICK_MENU_SHOW_CLOSE_CONTENT, PARSE_ONLY_BOOL}, @@ -11409,7 +11409,7 @@ unsigned menu_displaylist_build_list( #endif { - menu_displaylist_build_info_t build_list[] = { + static const menu_displaylist_build_info_t build_list[] = { {MENU_ENUM_LABEL_QUICK_MENU_SHOW_SET_CORE_ASSOCIATION, PARSE_ONLY_BOOL}, {MENU_ENUM_LABEL_QUICK_MENU_SHOW_RESET_CORE_ASSOCIATION, PARSE_ONLY_BOOL}, #ifdef HAVE_NETWORKING @@ -11430,7 +11430,7 @@ unsigned menu_displaylist_build_list( break; case DISPLAYLIST_CORE_SETTINGS_LIST: { - menu_displaylist_build_info_t build_list[] = { + static const menu_displaylist_build_info_t build_list[] = { {MENU_ENUM_LABEL_CORE_INFO_CACHE_ENABLE, PARSE_ONLY_BOOL}, {MENU_ENUM_LABEL_CORE_INFO_SAVESTATE_BYPASS, PARSE_ONLY_BOOL}, {MENU_ENUM_LABEL_CHECK_FOR_MISSING_FIRMWARE, PARSE_ONLY_BOOL}, @@ -11472,7 +11472,7 @@ unsigned menu_displaylist_build_list( break; case DISPLAYLIST_CONFIGURATION_SETTINGS_LIST: { - menu_displaylist_build_info_t build_list[] = { + static const menu_displaylist_build_info_t build_list[] = { {MENU_ENUM_LABEL_CONFIG_SAVE_ON_EXIT, PARSE_ONLY_BOOL}, {MENU_ENUM_LABEL_REMAP_SAVE_ON_EXIT, PARSE_ONLY_BOOL}, {MENU_ENUM_LABEL_GAME_SPECIFIC_OPTIONS, PARSE_ONLY_BOOL}, @@ -11493,7 +11493,7 @@ unsigned menu_displaylist_build_list( break; case DISPLAYLIST_DIRECTORY_SETTINGS_LIST: { - menu_displaylist_build_info_t build_list[] = { + static const menu_displaylist_build_info_t build_list[] = { {MENU_ENUM_LABEL_RGUI_BROWSER_DIRECTORY, PARSE_ONLY_DIR}, {MENU_ENUM_LABEL_CACHE_DIRECTORY, PARSE_ONLY_DIR}, {MENU_ENUM_LABEL_SYSTEM_DIRECTORY, PARSE_ONLY_DIR}, @@ -11547,7 +11547,7 @@ unsigned menu_displaylist_build_list( break; case DISPLAYLIST_DRIVER_SETTINGS_LIST: { - menu_displaylist_build_info_t build_list[] = { + static const menu_displaylist_build_info_t build_list[] = { {MENU_ENUM_LABEL_MENU_DRIVER, PARSE_ONLY_STRING_OPTIONS}, {MENU_ENUM_LABEL_VIDEO_DRIVER, PARSE_ONLY_STRING_OPTIONS}, {MENU_ENUM_LABEL_AUDIO_DRIVER, PARSE_ONLY_STRING_OPTIONS},