diff --git a/configuration.h b/configuration.h index 023fe9b3b8..2f495d78f8 100644 --- a/configuration.h +++ b/configuration.h @@ -346,6 +346,8 @@ typedef struct settings } cheevos; #endif + char browse_url[4096]; + int state_slot; bool bundle_assets_extract_enable; diff --git a/intl/msg_hash_de.h b/intl/msg_hash_de.h index 9ef4961177..fa03848c7a 100644 --- a/intl/msg_hash_de.h +++ b/intl/msg_hash_de.h @@ -886,3 +886,15 @@ MSG_HASH(MENU_ENUM_SUBLABEL_INPUT_UNIFIED_MENU_CONTROLS, "Use the same controls for both the menu and the game. Applies to the keyboard.") MSG_HASH(MENU_ENUM_SUBLABEL_VIDEO_FONT_ENABLE, "Show onscreen messages.") +MSG_HASH( + MENU_ENUM_LABEL_VALUE_BROWSE_URL_LIST, + "Browse URL" + ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_BROWSE_URL, + "URL Path" + ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_BROWSE_START, + "Start" + ) diff --git a/intl/msg_hash_eo.h b/intl/msg_hash_eo.h index 6b78680cf1..da8701b623 100644 --- a/intl/msg_hash_eo.h +++ b/intl/msg_hash_eo.h @@ -2247,3 +2247,15 @@ MSG_HASH(MENU_ENUM_SUBLABEL_INPUT_UNIFIED_MENU_CONTROLS, "Use the same controls for both the menu and the game. Applies to the keyboard.") MSG_HASH(MENU_ENUM_SUBLABEL_VIDEO_FONT_ENABLE, "Show onscreen messages.") +MSG_HASH( + MENU_ENUM_LABEL_VALUE_BROWSE_URL_LIST, + "Browse URL" + ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_BROWSE_URL, + "URL Path" + ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_BROWSE_START, + "Start" + ) diff --git a/intl/msg_hash_fr.h b/intl/msg_hash_fr.h index 17e5f05936..5a96e29b44 100644 --- a/intl/msg_hash_fr.h +++ b/intl/msg_hash_fr.h @@ -2213,3 +2213,15 @@ MSG_HASH(MENU_ENUM_SUBLABEL_INPUT_UNIFIED_MENU_CONTROLS, "Use the same controls for both the menu and the game. Applies to the keyboard.") MSG_HASH(MENU_ENUM_SUBLABEL_VIDEO_FONT_ENABLE, "Show onscreen messages.") +MSG_HASH( + MENU_ENUM_LABEL_VALUE_BROWSE_URL_LIST, + "Browse URL" + ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_BROWSE_URL, + "URL Path" + ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_BROWSE_START, + "Start" + ) diff --git a/intl/msg_hash_ja.h b/intl/msg_hash_ja.h index fe8be4bbf2..d43686b56d 100644 --- a/intl/msg_hash_ja.h +++ b/intl/msg_hash_ja.h @@ -2368,3 +2368,15 @@ MSG_HASH(MENU_ENUM_LABEL_VALUE_SCALE, "スケール") MSG_HASH(MENU_ENUM_LABEL_VALUE_NETPLAY_START_WHEN_LOADED, "コンテンツをロードする後にネットプレイは開始します。") +MSG_HASH( + MENU_ENUM_LABEL_VALUE_BROWSE_URL_LIST, + "Browse URL" + ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_BROWSE_URL, + "URL Path" + ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_BROWSE_START, + "Start" + ) diff --git a/intl/msg_hash_lbl.h b/intl/msg_hash_lbl.h index d22546d1cb..146eaca154 100644 --- a/intl/msg_hash_lbl.h +++ b/intl/msg_hash_lbl.h @@ -159,6 +159,8 @@ MSG_HASH(MENU_ENUM_LABEL_CONTENT_ACTIONS, "content_actions") MSG_HASH(MENU_ENUM_LABEL_CONTENT_COLLECTION_LIST, "select_from_collection") +MSG_HASH(MENU_ENUM_LABEL_BROWSE_URL_LIST, + "browse_url_list") MSG_HASH(MENU_ENUM_LABEL_CONTENT_DATABASE_DIRECTORY, "content_database_path") MSG_HASH(MENU_ENUM_LABEL_CONTENT_HISTORY_SIZE, @@ -213,6 +215,8 @@ MSG_HASH(MENU_ENUM_LABEL_CUSTOM_RATIO, "custom_ratio") MSG_HASH(MENU_ENUM_LABEL_DATABASE_MANAGER_LIST, "database_manager_list") +MSG_HASH(MENU_ENUM_LABEL_DEFERRED_BROWSE_URL_LIST, + "deferred_browse_url_list") MSG_HASH(MENU_ENUM_LABEL_DEFERRED_ACCOUNTS_CHEEVOS_LIST, "deferred_accounts_cheevos_list") MSG_HASH(MENU_ENUM_LABEL_DEFERRED_ACCOUNTS_LIST, @@ -1167,3 +1171,7 @@ MSG_HASH(MENU_ENUM_LABEL_FILE_DETECT_CORE_LIST_PUSH_DIR, "detect_core_list_push_dir") MSG_HASH(MENU_ENUM_LABEL_BATTERY_LEVEL_ENABLE, "menu_battery_level_enable") +MSG_HASH(MENU_ENUM_LABEL_BROWSE_URL, + "browse_url") +MSG_HASH(MENU_ENUM_LABEL_BROWSE_START, + "browse_start") diff --git a/intl/msg_hash_nl.h b/intl/msg_hash_nl.h index 2034c6656e..1a0d5b8afb 100644 --- a/intl/msg_hash_nl.h +++ b/intl/msg_hash_nl.h @@ -2247,3 +2247,15 @@ MSG_HASH(MENU_ENUM_SUBLABEL_INPUT_UNIFIED_MENU_CONTROLS, "Use the same controls for both the menu and the game. Applies to the keyboard.") MSG_HASH(MENU_ENUM_SUBLABEL_VIDEO_FONT_ENABLE, "Show onscreen messages.") +MSG_HASH( + MENU_ENUM_LABEL_VALUE_BROWSE_URL_LIST, + "Browse URL" + ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_BROWSE_URL, + "URL Path" + ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_BROWSE_START, + "Start" + ) diff --git a/intl/msg_hash_ru.h b/intl/msg_hash_ru.h index 1d832a485b..6f515d2136 100644 --- a/intl/msg_hash_ru.h +++ b/intl/msg_hash_ru.h @@ -2246,3 +2246,15 @@ MSG_HASH(MENU_ENUM_SUBLABEL_INPUT_UNIFIED_MENU_CONTROLS, "Use the same controls for both the menu and the game. Applies to the keyboard.") MSG_HASH(MENU_ENUM_SUBLABEL_VIDEO_FONT_ENABLE, "Show onscreen messages.") +MSG_HASH( + MENU_ENUM_LABEL_VALUE_BROWSE_URL_LIST, + "Browse URL" + ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_BROWSE_URL, + "URL Path" + ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_BROWSE_START, + "Start" + ) diff --git a/intl/msg_hash_us.h b/intl/msg_hash_us.h index 258bbc8397..8ef2193a2a 100644 --- a/intl/msg_hash_us.h +++ b/intl/msg_hash_us.h @@ -2363,3 +2363,15 @@ MSG_HASH(MENU_ENUM_LABEL_VALUE_SCALE, "Scale") MSG_HASH(MENU_ENUM_LABEL_VALUE_NETPLAY_START_WHEN_LOADED, "Netplay will start when content is loaded.") +MSG_HASH( + MENU_ENUM_LABEL_VALUE_BROWSE_URL_LIST, + "Browse URL" + ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_BROWSE_URL, + "URL Path" + ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_BROWSE_START, + "Start" + ) diff --git a/menu/cbs/menu_cbs_deferred_push.c b/menu/cbs/menu_cbs_deferred_push.c index ccec4b0fdb..bf7fb4cc3b 100644 --- a/menu/cbs/menu_cbs_deferred_push.c +++ b/menu/cbs/menu_cbs_deferred_push.c @@ -774,6 +774,11 @@ static int deferred_push_content_collection_list(menu_displaylist_info_t *info) return deferred_push_dlist(info, DISPLAYLIST_DATABASE_PLAYLISTS); } +static int deferred_push_browse_url_list(menu_displaylist_info_t *info) +{ + return deferred_push_dlist(info, DISPLAYLIST_BROWSE_URL_LIST); +} + static int deferred_push_core_list(menu_displaylist_info_t *info) { return deferred_push_dlist(info, DISPLAYLIST_CORES); @@ -848,6 +853,11 @@ static int menu_cbs_init_bind_deferred_push_compare_label( menu_file_list_cbs_t *cbs, const char *label, uint32_t label_hash) { + if (string_is_equal(label, msg_hash_to_str(MENU_ENUM_LABEL_DEFERRED_BROWSE_URL_LIST))) + { + BIND_ACTION_DEFERRED_PUSH(cbs, deferred_push_browse_url_list); + return 0; + } if (string_is_equal(label, msg_hash_to_str(MENU_ENUM_LABEL_DEFERRED_CORE_SETTINGS_LIST))) { BIND_ACTION_DEFERRED_PUSH(cbs, deferred_push_core_settings_list); diff --git a/menu/cbs/menu_cbs_ok.c b/menu/cbs/menu_cbs_ok.c index a6b4af9530..3eb89eaaf7 100644 --- a/menu/cbs/menu_cbs_ok.c +++ b/menu/cbs/menu_cbs_ok.c @@ -435,6 +435,14 @@ int generic_action_ok_displaylist_push(const char *path, info_label = label; dl_type = DISPLAYLIST_FILE_BROWSER_SELECT_CORE; break; + case ACTION_OK_DL_BROWSE_URL_LIST: + info.directory_ptr = idx; + info.type = type; + info_path = path; + info_label = msg_hash_to_str(MENU_ENUM_LABEL_DEFERRED_BROWSE_URL_LIST); + info.enum_idx = MENU_ENUM_LABEL_DEFERRED_BROWSE_URL_LIST; + dl_type = DISPLAYLIST_GENERIC; + break; case ACTION_OK_DL_CONTENT_COLLECTION_LIST: filebrowser_set_type(FILEBROWSER_SELECT_COLLECTION); info.type = type; @@ -3117,6 +3125,13 @@ static int action_ok_netplay_lan_scan(const char *path, #endif } +static int action_ok_browse_url_list(const char *path, + const char *label, unsigned type, size_t idx, size_t entry_idx) +{ + return generic_action_ok_displaylist_push(path, NULL, label, type, idx, + entry_idx, ACTION_OK_DL_BROWSE_URL_LIST); +} + static int action_ok_content_collection_list(const char *path, const char *label, unsigned type, size_t idx, size_t entry_idx) { @@ -3926,6 +3941,9 @@ static int menu_cbs_init_bind_ok_compare_label(menu_file_list_cbs_t *cbs, case MENU_ENUM_LABEL_CONTENT_COLLECTION_LIST: BIND_ACTION_OK(cbs, action_ok_content_collection_list); break; + case MENU_ENUM_LABEL_BROWSE_URL_LIST: + BIND_ACTION_OK(cbs, action_ok_browse_url_list); + break; case MENU_ENUM_LABEL_CORE_LIST: BIND_ACTION_OK(cbs, action_ok_core_list); break; diff --git a/menu/menu_cbs.h b/menu/menu_cbs.h index 7f9ac751c3..b5d782ed7d 100644 --- a/menu/menu_cbs.h +++ b/menu/menu_cbs.h @@ -78,6 +78,7 @@ enum ACTION_OK_DL_CURSOR_MANAGER_LIST, ACTION_OK_DL_CORE_UPDATER_LIST, ACTION_OK_DL_THUMBNAILS_UPDATER_LIST, + ACTION_OK_DL_BROWSE_URL_LIST, ACTION_OK_DL_CORE_CONTENT_LIST, ACTION_OK_DL_CORE_CONTENT_DIRS_LIST, ACTION_OK_DL_CORE_CONTENT_DIRS_SUBDIR_LIST, diff --git a/menu/menu_displaylist.c b/menu/menu_displaylist.c index 368832e7aa..cd162655bd 100644 --- a/menu/menu_displaylist.c +++ b/menu/menu_displaylist.c @@ -3901,6 +3901,7 @@ bool menu_displaylist_ctl(enum menu_displaylist_ctl_state type, void *data) switch (type) { + case DISPLAYLIST_BROWSE_URL_LIST: case DISPLAYLIST_HELP_SCREEN_LIST: case DISPLAYLIST_MAIN_MENU: case DISPLAYLIST_SETTINGS_ALL: @@ -4088,6 +4089,21 @@ bool menu_displaylist_ctl(enum menu_displaylist_ctl_state type, void *data) MENU_SETTING_NO_ITEM, 0, 0); ret = 0; #endif + info->need_refresh = true; + info->need_push = true; + break; + case DISPLAYLIST_BROWSE_URL_LIST: + menu_entries_append_enum(info->list, + msg_hash_to_str(MENU_ENUM_LABEL_VALUE_BROWSE_URL), + msg_hash_to_str(MENU_ENUM_LABEL_BROWSE_URL), + MENU_ENUM_LABEL_BROWSE_URL, + 0, 0, 0); + menu_entries_append_enum(info->list, + msg_hash_to_str(MENU_ENUM_LABEL_VALUE_BROWSE_START), + msg_hash_to_str(MENU_ENUM_LABEL_BROWSE_START), + MENU_ENUM_LABEL_BROWSE_START, + 0, 0, 0); + info->need_refresh = true; info->need_push = true; break; @@ -5310,6 +5326,14 @@ bool menu_displaylist_ctl(enum menu_displaylist_ctl_state type, void *data) MENU_SETTING_ACTION, 0, 0); #endif +#if 0 + menu_entries_append_enum(info->list, + msg_hash_to_str(MENU_ENUM_LABEL_VALUE_BROWSE_URL_LIST), + msg_hash_to_str(MENU_ENUM_LABEL_BROWSE_URL_LIST), + MENU_ENUM_LABEL_BROWSE_URL_LIST, + MENU_SETTING_ACTION, 0, 0); +#endif + info->need_push = true; info->need_refresh = true; break; diff --git a/menu/menu_displaylist.h b/menu/menu_displaylist.h index c3acc84383..c3d75420fd 100644 --- a/menu/menu_displaylist.h +++ b/menu/menu_displaylist.h @@ -136,6 +136,7 @@ enum menu_displaylist_ctl_state DISPLAYLIST_RECORDING_SETTINGS_LIST, DISPLAYLIST_PLAYLIST_SETTINGS_LIST, DISPLAYLIST_ACCOUNTS_CHEEVOS_LIST, + DISPLAYLIST_BROWSE_URL_LIST, DISPLAYLIST_LOAD_CONTENT_LIST, DISPLAYLIST_INFORMATION_LIST, DISPLAYLIST_CONTENT_SETTINGS, diff --git a/menu/menu_setting.c b/menu/menu_setting.c index 23841dbc98..090a54fc94 100644 --- a/menu/menu_setting.c +++ b/menu/menu_setting.c @@ -5901,6 +5901,20 @@ static bool setting_append_list( general_read_handler); settings_data_list_current_add_flags(list, list_info, SD_FLAG_ALLOW_INPUT); + CONFIG_STRING( + list, list_info, + settings->browse_url, + sizeof(settings->browse_url), + MENU_ENUM_LABEL_BROWSE_URL, + MENU_ENUM_LABEL_VALUE_BROWSE_URL, + "", + &group_info, + &subgroup_info, + parent_group, + general_write_handler, + general_read_handler); + settings_data_list_current_add_flags(list, list_info, SD_FLAG_ALLOW_INPUT); + #ifdef HAVE_LANGEXTRA CONFIG_UINT( list, list_info, diff --git a/msg_hash.h b/msg_hash.h index 123e908486..a1a9e59b88 100644 --- a/msg_hash.h +++ b/msg_hash.h @@ -785,7 +785,10 @@ enum msg_hash_enums MENU_ENUM_LABEL_WELCOME_TO_RETROARCH, + MENU_LABEL(BROWSE_URL), + MENU_LABEL(BROWSE_START), /* Deferred */ + MENU_ENUM_LABEL_DEFERRED_BROWSE_URL_LIST, MENU_ENUM_LABEL_DEFERRED_ARCHIVE_ACTION_DETECT_CORE, MENU_ENUM_LABEL_DEFERRED_ARCHIVE_ACTION, MENU_ENUM_LABEL_DEFERRED_ARCHIVE_OPEN_DETECT_CORE, @@ -1304,6 +1307,7 @@ enum msg_hash_enums MENU_ENUM_LABEL_COLLECTION, MENU_LABEL(CONFIGURATIONS), MENU_LABEL(CONTENT_COLLECTION_LIST), + MENU_LABEL(BROWSE_URL_LIST), MENU_ENUM_LABEL_CUSTOM_BIND, @@ -1552,6 +1556,7 @@ enum msg_hash_enums /* Deferred */ +#define MENU_LABEL_DEFERRED_BROWSE_URL_LIST 0x6358c2c4U #define MENU_LABEL_DEFERRED_THUMBNAILS_UPDATER_LIST 0x364dfa2bU #define MENU_LABEL_DEFERRED_VIDEO_FILTER 0x966ad201U #define MENU_LABEL_DEFERRED_CORE_LIST_SET 0xa6d5fdb4U @@ -1794,6 +1799,8 @@ enum msg_hash_enums #define MENU_VALUE_HORIZONTAL_MENU 0x35761704U #define MENU_LABEL_QUIT_RETROARCH 0x84b0bc71U +#define MENU_LABEL_BROWSE_URL_LIST 0xa7d1a004U + const char *msg_hash_to_str(enum msg_hash_enums msg); const char *msg_hash_to_str_fr(enum msg_hash_enums msg);