Add first part of 'Browse URL'

This commit is contained in:
twinaphex 2016-12-26 06:39:12 +01:00
parent 7512e39746
commit bfd0aa18e4
16 changed files with 169 additions and 0 deletions

View File

@ -346,6 +346,8 @@ typedef struct settings
} cheevos; } cheevos;
#endif #endif
char browse_url[4096];
int state_slot; int state_slot;
bool bundle_assets_extract_enable; bool bundle_assets_extract_enable;

View File

@ -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.") "Use the same controls for both the menu and the game. Applies to the keyboard.")
MSG_HASH(MENU_ENUM_SUBLABEL_VIDEO_FONT_ENABLE, MSG_HASH(MENU_ENUM_SUBLABEL_VIDEO_FONT_ENABLE,
"Show onscreen messages.") "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"
)

View File

@ -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.") "Use the same controls for both the menu and the game. Applies to the keyboard.")
MSG_HASH(MENU_ENUM_SUBLABEL_VIDEO_FONT_ENABLE, MSG_HASH(MENU_ENUM_SUBLABEL_VIDEO_FONT_ENABLE,
"Show onscreen messages.") "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"
)

View File

@ -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.") "Use the same controls for both the menu and the game. Applies to the keyboard.")
MSG_HASH(MENU_ENUM_SUBLABEL_VIDEO_FONT_ENABLE, MSG_HASH(MENU_ENUM_SUBLABEL_VIDEO_FONT_ENABLE,
"Show onscreen messages.") "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"
)

View File

@ -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_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"
)

View File

@ -159,6 +159,8 @@ MSG_HASH(MENU_ENUM_LABEL_CONTENT_ACTIONS,
"content_actions") "content_actions")
MSG_HASH(MENU_ENUM_LABEL_CONTENT_COLLECTION_LIST, MSG_HASH(MENU_ENUM_LABEL_CONTENT_COLLECTION_LIST,
"select_from_collection") "select_from_collection")
MSG_HASH(MENU_ENUM_LABEL_BROWSE_URL_LIST,
"browse_url_list")
MSG_HASH(MENU_ENUM_LABEL_CONTENT_DATABASE_DIRECTORY, MSG_HASH(MENU_ENUM_LABEL_CONTENT_DATABASE_DIRECTORY,
"content_database_path") "content_database_path")
MSG_HASH(MENU_ENUM_LABEL_CONTENT_HISTORY_SIZE, MSG_HASH(MENU_ENUM_LABEL_CONTENT_HISTORY_SIZE,
@ -213,6 +215,8 @@ MSG_HASH(MENU_ENUM_LABEL_CUSTOM_RATIO,
"custom_ratio") "custom_ratio")
MSG_HASH(MENU_ENUM_LABEL_DATABASE_MANAGER_LIST, MSG_HASH(MENU_ENUM_LABEL_DATABASE_MANAGER_LIST,
"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, MSG_HASH(MENU_ENUM_LABEL_DEFERRED_ACCOUNTS_CHEEVOS_LIST,
"deferred_accounts_cheevos_list") "deferred_accounts_cheevos_list")
MSG_HASH(MENU_ENUM_LABEL_DEFERRED_ACCOUNTS_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") "detect_core_list_push_dir")
MSG_HASH(MENU_ENUM_LABEL_BATTERY_LEVEL_ENABLE, MSG_HASH(MENU_ENUM_LABEL_BATTERY_LEVEL_ENABLE,
"menu_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")

View File

@ -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.") "Use the same controls for both the menu and the game. Applies to the keyboard.")
MSG_HASH(MENU_ENUM_SUBLABEL_VIDEO_FONT_ENABLE, MSG_HASH(MENU_ENUM_SUBLABEL_VIDEO_FONT_ENABLE,
"Show onscreen messages.") "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"
)

View File

@ -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.") "Use the same controls for both the menu and the game. Applies to the keyboard.")
MSG_HASH(MENU_ENUM_SUBLABEL_VIDEO_FONT_ENABLE, MSG_HASH(MENU_ENUM_SUBLABEL_VIDEO_FONT_ENABLE,
"Show onscreen messages.") "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"
)

View File

@ -2363,3 +2363,15 @@ MSG_HASH(MENU_ENUM_LABEL_VALUE_SCALE,
"Scale") "Scale")
MSG_HASH(MENU_ENUM_LABEL_VALUE_NETPLAY_START_WHEN_LOADED, MSG_HASH(MENU_ENUM_LABEL_VALUE_NETPLAY_START_WHEN_LOADED,
"Netplay will start when content is 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"
)

View File

@ -774,6 +774,11 @@ static int deferred_push_content_collection_list(menu_displaylist_info_t *info)
return deferred_push_dlist(info, DISPLAYLIST_DATABASE_PLAYLISTS); 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) static int deferred_push_core_list(menu_displaylist_info_t *info)
{ {
return deferred_push_dlist(info, DISPLAYLIST_CORES); 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, menu_file_list_cbs_t *cbs,
const char *label, uint32_t label_hash) 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))) 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); BIND_ACTION_DEFERRED_PUSH(cbs, deferred_push_core_settings_list);

View File

@ -435,6 +435,14 @@ int generic_action_ok_displaylist_push(const char *path,
info_label = label; info_label = label;
dl_type = DISPLAYLIST_FILE_BROWSER_SELECT_CORE; dl_type = DISPLAYLIST_FILE_BROWSER_SELECT_CORE;
break; 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: case ACTION_OK_DL_CONTENT_COLLECTION_LIST:
filebrowser_set_type(FILEBROWSER_SELECT_COLLECTION); filebrowser_set_type(FILEBROWSER_SELECT_COLLECTION);
info.type = type; info.type = type;
@ -3117,6 +3125,13 @@ static int action_ok_netplay_lan_scan(const char *path,
#endif #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, static int action_ok_content_collection_list(const char *path,
const char *label, unsigned type, size_t idx, size_t entry_idx) 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: case MENU_ENUM_LABEL_CONTENT_COLLECTION_LIST:
BIND_ACTION_OK(cbs, action_ok_content_collection_list); BIND_ACTION_OK(cbs, action_ok_content_collection_list);
break; break;
case MENU_ENUM_LABEL_BROWSE_URL_LIST:
BIND_ACTION_OK(cbs, action_ok_browse_url_list);
break;
case MENU_ENUM_LABEL_CORE_LIST: case MENU_ENUM_LABEL_CORE_LIST:
BIND_ACTION_OK(cbs, action_ok_core_list); BIND_ACTION_OK(cbs, action_ok_core_list);
break; break;

View File

@ -78,6 +78,7 @@ enum
ACTION_OK_DL_CURSOR_MANAGER_LIST, ACTION_OK_DL_CURSOR_MANAGER_LIST,
ACTION_OK_DL_CORE_UPDATER_LIST, ACTION_OK_DL_CORE_UPDATER_LIST,
ACTION_OK_DL_THUMBNAILS_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_LIST,
ACTION_OK_DL_CORE_CONTENT_DIRS_LIST, ACTION_OK_DL_CORE_CONTENT_DIRS_LIST,
ACTION_OK_DL_CORE_CONTENT_DIRS_SUBDIR_LIST, ACTION_OK_DL_CORE_CONTENT_DIRS_SUBDIR_LIST,

View File

@ -3901,6 +3901,7 @@ bool menu_displaylist_ctl(enum menu_displaylist_ctl_state type, void *data)
switch (type) switch (type)
{ {
case DISPLAYLIST_BROWSE_URL_LIST:
case DISPLAYLIST_HELP_SCREEN_LIST: case DISPLAYLIST_HELP_SCREEN_LIST:
case DISPLAYLIST_MAIN_MENU: case DISPLAYLIST_MAIN_MENU:
case DISPLAYLIST_SETTINGS_ALL: 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); MENU_SETTING_NO_ITEM, 0, 0);
ret = 0; ret = 0;
#endif #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_refresh = true;
info->need_push = true; info->need_push = true;
break; break;
@ -5310,6 +5326,14 @@ bool menu_displaylist_ctl(enum menu_displaylist_ctl_state type, void *data)
MENU_SETTING_ACTION, 0, 0); MENU_SETTING_ACTION, 0, 0);
#endif #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_push = true;
info->need_refresh = true; info->need_refresh = true;
break; break;

View File

@ -136,6 +136,7 @@ enum menu_displaylist_ctl_state
DISPLAYLIST_RECORDING_SETTINGS_LIST, DISPLAYLIST_RECORDING_SETTINGS_LIST,
DISPLAYLIST_PLAYLIST_SETTINGS_LIST, DISPLAYLIST_PLAYLIST_SETTINGS_LIST,
DISPLAYLIST_ACCOUNTS_CHEEVOS_LIST, DISPLAYLIST_ACCOUNTS_CHEEVOS_LIST,
DISPLAYLIST_BROWSE_URL_LIST,
DISPLAYLIST_LOAD_CONTENT_LIST, DISPLAYLIST_LOAD_CONTENT_LIST,
DISPLAYLIST_INFORMATION_LIST, DISPLAYLIST_INFORMATION_LIST,
DISPLAYLIST_CONTENT_SETTINGS, DISPLAYLIST_CONTENT_SETTINGS,

View File

@ -5901,6 +5901,20 @@ static bool setting_append_list(
general_read_handler); general_read_handler);
settings_data_list_current_add_flags(list, list_info, SD_FLAG_ALLOW_INPUT); 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 #ifdef HAVE_LANGEXTRA
CONFIG_UINT( CONFIG_UINT(
list, list_info, list, list_info,

View File

@ -785,7 +785,10 @@ enum msg_hash_enums
MENU_ENUM_LABEL_WELCOME_TO_RETROARCH, MENU_ENUM_LABEL_WELCOME_TO_RETROARCH,
MENU_LABEL(BROWSE_URL),
MENU_LABEL(BROWSE_START),
/* Deferred */ /* Deferred */
MENU_ENUM_LABEL_DEFERRED_BROWSE_URL_LIST,
MENU_ENUM_LABEL_DEFERRED_ARCHIVE_ACTION_DETECT_CORE, MENU_ENUM_LABEL_DEFERRED_ARCHIVE_ACTION_DETECT_CORE,
MENU_ENUM_LABEL_DEFERRED_ARCHIVE_ACTION, MENU_ENUM_LABEL_DEFERRED_ARCHIVE_ACTION,
MENU_ENUM_LABEL_DEFERRED_ARCHIVE_OPEN_DETECT_CORE, MENU_ENUM_LABEL_DEFERRED_ARCHIVE_OPEN_DETECT_CORE,
@ -1304,6 +1307,7 @@ enum msg_hash_enums
MENU_ENUM_LABEL_COLLECTION, MENU_ENUM_LABEL_COLLECTION,
MENU_LABEL(CONFIGURATIONS), MENU_LABEL(CONFIGURATIONS),
MENU_LABEL(CONTENT_COLLECTION_LIST), MENU_LABEL(CONTENT_COLLECTION_LIST),
MENU_LABEL(BROWSE_URL_LIST),
MENU_ENUM_LABEL_CUSTOM_BIND, MENU_ENUM_LABEL_CUSTOM_BIND,
@ -1552,6 +1556,7 @@ enum msg_hash_enums
/* Deferred */ /* Deferred */
#define MENU_LABEL_DEFERRED_BROWSE_URL_LIST 0x6358c2c4U
#define MENU_LABEL_DEFERRED_THUMBNAILS_UPDATER_LIST 0x364dfa2bU #define MENU_LABEL_DEFERRED_THUMBNAILS_UPDATER_LIST 0x364dfa2bU
#define MENU_LABEL_DEFERRED_VIDEO_FILTER 0x966ad201U #define MENU_LABEL_DEFERRED_VIDEO_FILTER 0x966ad201U
#define MENU_LABEL_DEFERRED_CORE_LIST_SET 0xa6d5fdb4U #define MENU_LABEL_DEFERRED_CORE_LIST_SET 0xa6d5fdb4U
@ -1794,6 +1799,8 @@ enum msg_hash_enums
#define MENU_VALUE_HORIZONTAL_MENU 0x35761704U #define MENU_VALUE_HORIZONTAL_MENU 0x35761704U
#define MENU_LABEL_QUIT_RETROARCH 0x84b0bc71U #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(enum msg_hash_enums msg);
const char *msg_hash_to_str_fr(enum msg_hash_enums msg); const char *msg_hash_to_str_fr(enum msg_hash_enums msg);