mirror of
https://github.com/libretro/RetroArch
synced 2025-03-02 19:13:34 +00:00
Add Youtube/Twitch Stream key settings
This commit is contained in:
parent
bb0059c721
commit
cf7eea30cb
@ -1107,6 +1107,8 @@ static struct config_array_setting *populate_settings_array(settings_t *settings
|
||||
SETTING_ARRAY("midi_driver", settings->arrays.midi_driver, false, NULL, true);
|
||||
SETTING_ARRAY("midi_input", settings->arrays.midi_input, true, midi_input, true);
|
||||
SETTING_ARRAY("midi_output", settings->arrays.midi_output, true, midi_output, true);
|
||||
SETTING_ARRAY("youtube_stream_key", settings->arrays.youtube_stream_key, true, NULL, true);
|
||||
SETTING_ARRAY("twitch_stream_key", settings->arrays.twitch_stream_key, true, NULL, true);
|
||||
*size = count;
|
||||
|
||||
return tmp;
|
||||
|
@ -476,6 +476,9 @@ typedef struct settings
|
||||
|
||||
char midi_input[32];
|
||||
char midi_output[32];
|
||||
|
||||
char youtube_stream_key[PATH_MAX_LENGTH];
|
||||
char twitch_stream_key[PATH_MAX_LENGTH];
|
||||
} arrays;
|
||||
|
||||
struct
|
||||
|
@ -3647,3 +3647,7 @@ MSG_HASH(
|
||||
MENU_ENUM_LABEL_VALUE_ACCOUNTS_YOUTUBE,
|
||||
"YouTube"
|
||||
)
|
||||
MSG_HASH(MENU_ENUM_LABEL_VALUE_TWITCH_STREAM_KEY,
|
||||
"Twitch Stream Key")
|
||||
MSG_HASH(MENU_ENUM_LABEL_VALUE_YOUTUBE_STREAM_KEY,
|
||||
"YouTube Stream Key")
|
||||
|
@ -3431,3 +3431,7 @@ MSG_HASH(
|
||||
MENU_ENUM_LABEL_VALUE_ACCOUNTS_YOUTUBE,
|
||||
"YouTube"
|
||||
)
|
||||
MSG_HASH(MENU_ENUM_LABEL_VALUE_TWITCH_STREAM_KEY,
|
||||
"Twitch Stream Key")
|
||||
MSG_HASH(MENU_ENUM_LABEL_VALUE_YOUTUBE_STREAM_KEY,
|
||||
"YouTube Stream Key")
|
||||
|
@ -3423,3 +3423,7 @@ MSG_HASH(
|
||||
MENU_ENUM_LABEL_VALUE_ACCOUNTS_YOUTUBE,
|
||||
"YouTube"
|
||||
)
|
||||
MSG_HASH(MENU_ENUM_LABEL_VALUE_TWITCH_STREAM_KEY,
|
||||
"Twitch Stream Key")
|
||||
MSG_HASH(MENU_ENUM_LABEL_VALUE_YOUTUBE_STREAM_KEY,
|
||||
"YouTube Stream Key")
|
||||
|
@ -3533,3 +3533,7 @@ MSG_HASH(
|
||||
MENU_ENUM_LABEL_VALUE_ACCOUNTS_YOUTUBE,
|
||||
"YouTube"
|
||||
)
|
||||
MSG_HASH(MENU_ENUM_LABEL_VALUE_TWITCH_STREAM_KEY,
|
||||
"Twitch Stream Key")
|
||||
MSG_HASH(MENU_ENUM_LABEL_VALUE_YOUTUBE_STREAM_KEY,
|
||||
"YouTube Stream Key")
|
||||
|
@ -3298,3 +3298,7 @@ MSG_HASH(
|
||||
MENU_ENUM_LABEL_VALUE_ACCOUNTS_YOUTUBE,
|
||||
"YouTube"
|
||||
)
|
||||
MSG_HASH(MENU_ENUM_LABEL_VALUE_TWITCH_STREAM_KEY,
|
||||
"Twitch Stream Key")
|
||||
MSG_HASH(MENU_ENUM_LABEL_VALUE_YOUTUBE_STREAM_KEY,
|
||||
"YouTube Stream Key")
|
||||
|
@ -7553,3 +7553,7 @@ MSG_HASH(
|
||||
MENU_ENUM_LABEL_VALUE_ACCOUNTS_YOUTUBE,
|
||||
"YouTube"
|
||||
)
|
||||
MSG_HASH(MENU_ENUM_LABEL_VALUE_TWITCH_STREAM_KEY,
|
||||
"Twitch Stream Key")
|
||||
MSG_HASH(MENU_ENUM_LABEL_VALUE_YOUTUBE_STREAM_KEY,
|
||||
"YouTube Stream Key")
|
||||
|
@ -3457,3 +3457,7 @@ MSG_HASH(
|
||||
MENU_ENUM_LABEL_VALUE_ACCOUNTS_YOUTUBE,
|
||||
"YouTube"
|
||||
)
|
||||
MSG_HASH(MENU_ENUM_LABEL_VALUE_TWITCH_STREAM_KEY,
|
||||
"Twitch Stream Key")
|
||||
MSG_HASH(MENU_ENUM_LABEL_VALUE_YOUTUBE_STREAM_KEY,
|
||||
"YouTube Stream Key")
|
||||
|
@ -3517,3 +3517,7 @@ MSG_HASH(
|
||||
MENU_ENUM_LABEL_VALUE_ACCOUNTS_YOUTUBE,
|
||||
"YouTube"
|
||||
)
|
||||
MSG_HASH(MENU_ENUM_LABEL_VALUE_TWITCH_STREAM_KEY,
|
||||
"Twitch Stream Key")
|
||||
MSG_HASH(MENU_ENUM_LABEL_VALUE_YOUTUBE_STREAM_KEY,
|
||||
"YouTube Stream Key")
|
||||
|
@ -3920,3 +3920,7 @@ MSG_HASH(
|
||||
MENU_ENUM_LABEL_VALUE_ACCOUNTS_YOUTUBE,
|
||||
"YouTube"
|
||||
)
|
||||
MSG_HASH(MENU_ENUM_LABEL_VALUE_TWITCH_STREAM_KEY,
|
||||
"Twitch Stream Key")
|
||||
MSG_HASH(MENU_ENUM_LABEL_VALUE_YOUTUBE_STREAM_KEY,
|
||||
"YouTube Stream Key")
|
||||
|
@ -3418,3 +3418,7 @@ MSG_HASH(
|
||||
MENU_ENUM_LABEL_VALUE_ACCOUNTS_YOUTUBE,
|
||||
"YouTube"
|
||||
)
|
||||
MSG_HASH(MENU_ENUM_LABEL_VALUE_TWITCH_STREAM_KEY,
|
||||
"Twitch Stream Key")
|
||||
MSG_HASH(MENU_ENUM_LABEL_VALUE_YOUTUBE_STREAM_KEY,
|
||||
"YouTube Stream Key")
|
||||
|
@ -1695,3 +1695,7 @@ MSG_HASH(MENU_ENUM_LABEL_STREAMING_URL,
|
||||
"streaming_url")
|
||||
MSG_HASH(MENU_ENUM_LABEL_UDP_STREAM_PORT,
|
||||
"udp_stream_port")
|
||||
MSG_HASH(MENU_ENUM_LABEL_TWITCH_STREAM_KEY,
|
||||
"twitch_stream_key")
|
||||
MSG_HASH(MENU_ENUM_LABEL_YOUTUBE_STREAM_KEY,
|
||||
"youtube_stream_key")
|
||||
|
@ -3292,3 +3292,7 @@ MSG_HASH(
|
||||
MENU_ENUM_LABEL_VALUE_ACCOUNTS_YOUTUBE,
|
||||
"YouTube"
|
||||
)
|
||||
MSG_HASH(MENU_ENUM_LABEL_VALUE_TWITCH_STREAM_KEY,
|
||||
"Twitch Stream Key")
|
||||
MSG_HASH(MENU_ENUM_LABEL_VALUE_YOUTUBE_STREAM_KEY,
|
||||
"YouTube Stream Key")
|
||||
|
@ -3720,3 +3720,7 @@ MSG_HASH(
|
||||
MENU_ENUM_LABEL_VALUE_ACCOUNTS_YOUTUBE,
|
||||
"YouTube"
|
||||
)
|
||||
MSG_HASH(MENU_ENUM_LABEL_VALUE_TWITCH_STREAM_KEY,
|
||||
"Twitch Stream Key")
|
||||
MSG_HASH(MENU_ENUM_LABEL_VALUE_YOUTUBE_STREAM_KEY,
|
||||
"YouTube Stream Key")
|
||||
|
@ -7536,3 +7536,7 @@ MSG_HASH(
|
||||
MENU_ENUM_LABEL_VALUE_ACCOUNTS_YOUTUBE,
|
||||
"YouTube"
|
||||
)
|
||||
MSG_HASH(MENU_ENUM_LABEL_VALUE_TWITCH_STREAM_KEY,
|
||||
"Twitch Stream Key")
|
||||
MSG_HASH(MENU_ENUM_LABEL_VALUE_YOUTUBE_STREAM_KEY,
|
||||
"YouTube Stream Key")
|
||||
|
@ -3384,3 +3384,7 @@ MSG_HASH(
|
||||
MENU_ENUM_LABEL_VALUE_ACCOUNTS_YOUTUBE,
|
||||
"YouTube"
|
||||
)
|
||||
MSG_HASH(MENU_ENUM_LABEL_VALUE_TWITCH_STREAM_KEY,
|
||||
"Twitch Stream Key")
|
||||
MSG_HASH(MENU_ENUM_LABEL_VALUE_YOUTUBE_STREAM_KEY,
|
||||
"YouTube Stream Key")
|
||||
|
@ -3587,3 +3587,7 @@ MSG_HASH(
|
||||
MENU_ENUM_LABEL_VALUE_ACCOUNTS_YOUTUBE,
|
||||
"YouTube"
|
||||
)
|
||||
MSG_HASH(MENU_ENUM_LABEL_VALUE_TWITCH_STREAM_KEY,
|
||||
"Twitch Stream Key")
|
||||
MSG_HASH(MENU_ENUM_LABEL_VALUE_YOUTUBE_STREAM_KEY,
|
||||
"YouTube Stream Key")
|
||||
|
@ -7574,3 +7574,7 @@ MSG_HASH(
|
||||
MENU_ENUM_LABEL_VALUE_ACCOUNTS_YOUTUBE,
|
||||
"YouTube"
|
||||
)
|
||||
MSG_HASH(MENU_ENUM_LABEL_VALUE_TWITCH_STREAM_KEY,
|
||||
"Twitch Stream Key")
|
||||
MSG_HASH(MENU_ENUM_LABEL_VALUE_YOUTUBE_STREAM_KEY,
|
||||
"YouTube Stream Key")
|
||||
|
@ -3455,3 +3455,7 @@ MSG_HASH(
|
||||
MENU_ENUM_LABEL_VALUE_ACCOUNTS_YOUTUBE,
|
||||
"YouTube"
|
||||
)
|
||||
MSG_HASH(MENU_ENUM_LABEL_VALUE_TWITCH_STREAM_KEY,
|
||||
"Twitch Stream Key")
|
||||
MSG_HASH(MENU_ENUM_LABEL_VALUE_YOUTUBE_STREAM_KEY,
|
||||
"YouTube Stream Key")
|
||||
|
@ -7337,6 +7337,11 @@ bool menu_displaylist_ctl(enum menu_displaylist_ctl_state type, void *data)
|
||||
case DISPLAYLIST_ACCOUNTS_YOUTUBE_LIST:
|
||||
menu_entries_ctl(MENU_ENTRIES_CTL_CLEAR, info->list);
|
||||
|
||||
if (menu_displaylist_parse_settings_enum(menu, info,
|
||||
MENU_ENUM_LABEL_YOUTUBE_STREAM_KEY,
|
||||
PARSE_ONLY_STRING, false) == 0)
|
||||
count++;
|
||||
|
||||
if (count == 0)
|
||||
menu_entries_append_enum(info->list,
|
||||
msg_hash_to_str(MENU_ENUM_LABEL_VALUE_NO_ITEMS),
|
||||
@ -7351,6 +7356,11 @@ bool menu_displaylist_ctl(enum menu_displaylist_ctl_state type, void *data)
|
||||
case DISPLAYLIST_ACCOUNTS_TWITCH_LIST:
|
||||
menu_entries_ctl(MENU_ENTRIES_CTL_CLEAR, info->list);
|
||||
|
||||
if (menu_displaylist_parse_settings_enum(menu, info,
|
||||
MENU_ENUM_LABEL_TWITCH_STREAM_KEY,
|
||||
PARSE_ONLY_STRING, false) == 0)
|
||||
count++;
|
||||
|
||||
if (count == 0)
|
||||
menu_entries_append_enum(info->list,
|
||||
msg_hash_to_str(MENU_ENUM_LABEL_VALUE_NO_ITEMS),
|
||||
|
@ -9586,6 +9586,58 @@ static bool setting_append_list(
|
||||
&subgroup_info,
|
||||
parent_group);
|
||||
|
||||
END_SUB_GROUP(list, list_info, parent_group);
|
||||
END_GROUP(list, list_info, parent_group);
|
||||
break;
|
||||
case SETTINGS_LIST_USER_ACCOUNTS_YOUTUBE:
|
||||
START_GROUP(list, list_info, &group_info,
|
||||
msg_hash_to_str(MENU_ENUM_LABEL_VALUE_ACCOUNTS_YOUTUBE),
|
||||
parent_group);
|
||||
|
||||
parent_group = msg_hash_to_str(MENU_ENUM_LABEL_SETTINGS);
|
||||
|
||||
START_SUB_GROUP(list, list_info, "State", &group_info, &subgroup_info, parent_group);
|
||||
|
||||
CONFIG_STRING(
|
||||
list, list_info,
|
||||
settings->arrays.youtube_stream_key,
|
||||
sizeof(settings->arrays.youtube_stream_key),
|
||||
MENU_ENUM_LABEL_YOUTUBE_STREAM_KEY,
|
||||
MENU_ENUM_LABEL_VALUE_YOUTUBE_STREAM_KEY,
|
||||
"",
|
||||
&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);
|
||||
|
||||
END_SUB_GROUP(list, list_info, parent_group);
|
||||
END_GROUP(list, list_info, parent_group);
|
||||
break;
|
||||
case SETTINGS_LIST_USER_ACCOUNTS_TWITCH:
|
||||
START_GROUP(list, list_info, &group_info,
|
||||
msg_hash_to_str(MENU_ENUM_LABEL_VALUE_ACCOUNTS_TWITCH),
|
||||
parent_group);
|
||||
|
||||
parent_group = msg_hash_to_str(MENU_ENUM_LABEL_SETTINGS);
|
||||
|
||||
START_SUB_GROUP(list, list_info, "State", &group_info, &subgroup_info, parent_group);
|
||||
|
||||
CONFIG_STRING(
|
||||
list, list_info,
|
||||
settings->arrays.twitch_stream_key,
|
||||
sizeof(settings->arrays.twitch_stream_key),
|
||||
MENU_ENUM_LABEL_TWITCH_STREAM_KEY,
|
||||
MENU_ENUM_LABEL_VALUE_TWITCH_STREAM_KEY,
|
||||
"",
|
||||
&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);
|
||||
|
||||
END_SUB_GROUP(list, list_info, parent_group);
|
||||
END_GROUP(list, list_info, parent_group);
|
||||
break;
|
||||
@ -10274,6 +10326,8 @@ static rarch_setting_t *menu_setting_new_internal(rarch_setting_info_t *list_inf
|
||||
SETTINGS_LIST_USER,
|
||||
SETTINGS_LIST_USER_ACCOUNTS,
|
||||
SETTINGS_LIST_USER_ACCOUNTS_CHEEVOS,
|
||||
SETTINGS_LIST_USER_ACCOUNTS_YOUTUBE,
|
||||
SETTINGS_LIST_USER_ACCOUNTS_TWITCH,
|
||||
SETTINGS_LIST_DIRECTORY,
|
||||
SETTINGS_LIST_PRIVACY,
|
||||
SETTINGS_LIST_MIDI
|
||||
|
@ -423,6 +423,8 @@ enum msg_hash_enums
|
||||
MENU_LABEL(ADD_TO_MIXER_AND_PLAY),
|
||||
MENU_LABEL(ADD_TO_MIXER_AND_COLLECTION),
|
||||
MENU_LABEL(ADD_TO_MIXER_AND_COLLECTION_AND_PLAY),
|
||||
MENU_LABEL(TWITCH_STREAM_KEY),
|
||||
MENU_LABEL(YOUTUBE_STREAM_KEY),
|
||||
MENU_ENUM_LABEL_MENU_TOGGLE,
|
||||
|
||||
MENU_LABEL(FILTER_BY_CURRENT_CORE),
|
||||
|
Loading…
x
Reference in New Issue
Block a user