diff --git a/configuration.c b/configuration.c index d4ec814f49..1831f5337c 100644 --- a/configuration.c +++ b/configuration.c @@ -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; diff --git a/configuration.h b/configuration.h index 281471252b..9b150befb2 100644 --- a/configuration.h +++ b/configuration.h @@ -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 diff --git a/intl/msg_hash_ar.h b/intl/msg_hash_ar.h index 198c8ac1f0..1694947179 100644 --- a/intl/msg_hash_ar.h +++ b/intl/msg_hash_ar.h @@ -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") diff --git a/intl/msg_hash_chs.h b/intl/msg_hash_chs.h index 8678ab5e10..88f1407edd 100644 --- a/intl/msg_hash_chs.h +++ b/intl/msg_hash_chs.h @@ -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") diff --git a/intl/msg_hash_cht.h b/intl/msg_hash_cht.h index 7fe145858d..a0e2effc1d 100644 --- a/intl/msg_hash_cht.h +++ b/intl/msg_hash_cht.h @@ -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") diff --git a/intl/msg_hash_de.h b/intl/msg_hash_de.h index c2cc07eff6..be45d4f8a9 100644 --- a/intl/msg_hash_de.h +++ b/intl/msg_hash_de.h @@ -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") diff --git a/intl/msg_hash_eo.h b/intl/msg_hash_eo.h index 73c69d2769..318589b705 100644 --- a/intl/msg_hash_eo.h +++ b/intl/msg_hash_eo.h @@ -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") diff --git a/intl/msg_hash_es.h b/intl/msg_hash_es.h index bae5b5b649..52d813a1bf 100644 --- a/intl/msg_hash_es.h +++ b/intl/msg_hash_es.h @@ -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") diff --git a/intl/msg_hash_fr.h b/intl/msg_hash_fr.h index 5c10cc9465..52c814fd2b 100644 --- a/intl/msg_hash_fr.h +++ b/intl/msg_hash_fr.h @@ -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") diff --git a/intl/msg_hash_it.h b/intl/msg_hash_it.h index 170eb0ec88..8975b99735 100644 --- a/intl/msg_hash_it.h +++ b/intl/msg_hash_it.h @@ -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") diff --git a/intl/msg_hash_ja.h b/intl/msg_hash_ja.h index 7fd7f82b30..dcd7b75d37 100644 --- a/intl/msg_hash_ja.h +++ b/intl/msg_hash_ja.h @@ -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") diff --git a/intl/msg_hash_ko.h b/intl/msg_hash_ko.h index ebfcfce345..4857b205e2 100644 --- a/intl/msg_hash_ko.h +++ b/intl/msg_hash_ko.h @@ -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") diff --git a/intl/msg_hash_lbl.h b/intl/msg_hash_lbl.h index 46db61489b..d0a3e48cef 100644 --- a/intl/msg_hash_lbl.h +++ b/intl/msg_hash_lbl.h @@ -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") diff --git a/intl/msg_hash_nl.h b/intl/msg_hash_nl.h index f5343afc7a..28a0130864 100644 --- a/intl/msg_hash_nl.h +++ b/intl/msg_hash_nl.h @@ -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") diff --git a/intl/msg_hash_pl.h b/intl/msg_hash_pl.h index 11f65a864e..130526327b 100644 --- a/intl/msg_hash_pl.h +++ b/intl/msg_hash_pl.h @@ -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") diff --git a/intl/msg_hash_pt_br.h b/intl/msg_hash_pt_br.h index 7288ec4122..daeff89b32 100644 --- a/intl/msg_hash_pt_br.h +++ b/intl/msg_hash_pt_br.h @@ -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") diff --git a/intl/msg_hash_pt_pt.h b/intl/msg_hash_pt_pt.h index b584e53038..4c2b328b8e 100644 --- a/intl/msg_hash_pt_pt.h +++ b/intl/msg_hash_pt_pt.h @@ -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") diff --git a/intl/msg_hash_ru.h b/intl/msg_hash_ru.h index 926f445550..ad5e2497ed 100644 --- a/intl/msg_hash_ru.h +++ b/intl/msg_hash_ru.h @@ -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") diff --git a/intl/msg_hash_us.h b/intl/msg_hash_us.h index 9539802444..7628fc645c 100644 --- a/intl/msg_hash_us.h +++ b/intl/msg_hash_us.h @@ -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") diff --git a/intl/msg_hash_vn.h b/intl/msg_hash_vn.h index bdb45fb9d9..77e3a2a0b2 100644 --- a/intl/msg_hash_vn.h +++ b/intl/msg_hash_vn.h @@ -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") diff --git a/menu/menu_displaylist.c b/menu/menu_displaylist.c index f16d822854..1f1a278c78 100644 --- a/menu/menu_displaylist.c +++ b/menu/menu_displaylist.c @@ -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), diff --git a/menu/menu_setting.c b/menu/menu_setting.c index 93c7b6993b..1c5b303708 100644 --- a/menu/menu_setting.c +++ b/menu/menu_setting.c @@ -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 diff --git a/msg_hash.h b/msg_hash.h index 27a7cddedc..b14254ead6 100644 --- a/msg_hash.h +++ b/msg_hash.h @@ -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),