Add AI Service settings

This commit is contained in:
twinaphex 2019-08-21 20:43:32 +02:00
parent f6c451fafe
commit fea7694027
29 changed files with 210 additions and 0 deletions

View File

@ -3862,3 +3862,11 @@ MSG_HASH(
MENU_ENUM_SUBLABEL_SETTINGS_SHOW_INPUT,
"Show or hide 'Input Settings' on the Settings screen."
)
MSG_HASH(
MENU_ENUM_LABEL_VALUE_AI_SERVICE_SETTINGS,
"AI Service"
)
MSG_HASH(
MENU_ENUM_SUBLABEL_AI_SERVICE_SETTINGS,
"Change settings for the AI Service (Translation/TTS/Misc)."
)

View File

@ -4880,3 +4880,11 @@ MSG_HASH(
MENU_ENUM_SUBLABEL_SETTINGS_SHOW_INPUT,
"Show or hide 'Input Settings' on the Settings screen."
)
MSG_HASH(
MENU_ENUM_LABEL_VALUE_AI_SERVICE_SETTINGS,
"AI Service"
)
MSG_HASH(
MENU_ENUM_SUBLABEL_AI_SERVICE_SETTINGS,
"Change settings for the AI Service (Translation/TTS/Misc)."
)

View File

@ -3638,3 +3638,11 @@ MSG_HASH(
MENU_ENUM_SUBLABEL_SETTINGS_SHOW_INPUT,
"Show or hide 'Input Settings' on the Settings screen."
)
MSG_HASH(
MENU_ENUM_LABEL_VALUE_AI_SERVICE_SETTINGS,
"AI Service"
)
MSG_HASH(
MENU_ENUM_SUBLABEL_AI_SERVICE_SETTINGS,
"Change settings for the AI Service (Translation/TTS/Misc)."
)

View File

@ -3767,3 +3767,11 @@ MSG_HASH(
MENU_ENUM_SUBLABEL_SETTINGS_SHOW_INPUT,
"Show or hide 'Input Settings' on the Settings screen."
)
MSG_HASH(
MENU_ENUM_LABEL_VALUE_AI_SERVICE_SETTINGS,
"AI Service"
)
MSG_HASH(
MENU_ENUM_SUBLABEL_AI_SERVICE_SETTINGS,
"Change settings for the AI Service (Translation/TTS/Misc)."
)

View File

@ -7844,3 +7844,11 @@ MSG_HASH(
MENU_ENUM_SUBLABEL_SETTINGS_SHOW_INPUT,
"Show or hide 'Input Settings' on the Settings screen."
)
MSG_HASH(
MENU_ENUM_LABEL_VALUE_AI_SERVICE_SETTINGS,
"AI Service"
)
MSG_HASH(
MENU_ENUM_SUBLABEL_AI_SERVICE_SETTINGS,
"Change settings for the AI Service (Translation/TTS/Misc)."
)

View File

@ -3526,3 +3526,11 @@ MSG_HASH(
MENU_ENUM_SUBLABEL_SETTINGS_SHOW_INPUT,
"Show or hide 'Input Settings' on the Settings screen."
)
MSG_HASH(
MENU_ENUM_LABEL_VALUE_AI_SERVICE_SETTINGS,
"AI Service"
)
MSG_HASH(
MENU_ENUM_SUBLABEL_AI_SERVICE_SETTINGS,
"Change settings for the AI Service (Translation/TTS/Misc)."
)

View File

@ -7996,3 +7996,11 @@ MSG_HASH(
MENU_ENUM_SUBLABEL_SETTINGS_SHOW_INPUT,
"Show or hide 'Input Settings' on the Settings screen."
)
MSG_HASH(
MENU_ENUM_LABEL_VALUE_AI_SERVICE_SETTINGS,
"AI Service"
)
MSG_HASH(
MENU_ENUM_SUBLABEL_AI_SERVICE_SETTINGS,
"Change settings for the AI Service (Translation/TTS/Misc)."
)

View File

@ -8784,3 +8784,11 @@ MSG_HASH(
MENU_ENUM_SUBLABEL_SETTINGS_SHOW_INPUT,
"Show or hide 'Input Settings' on the Settings screen."
)
MSG_HASH(
MENU_ENUM_LABEL_VALUE_AI_SERVICE_SETTINGS,
"AI Service"
)
MSG_HASH(
MENU_ENUM_SUBLABEL_AI_SERVICE_SETTINGS,
"Change settings for the AI Service (Translation/TTS/Misc)."
)

View File

@ -3747,3 +3747,11 @@ MSG_HASH(
MENU_ENUM_SUBLABEL_SETTINGS_SHOW_INPUT,
"Show or hide 'Input Settings' on the Settings screen."
)
MSG_HASH(
MENU_ENUM_LABEL_VALUE_AI_SERVICE_SETTINGS,
"AI Service"
)
MSG_HASH(
MENU_ENUM_SUBLABEL_AI_SERVICE_SETTINGS,
"Change settings for the AI Service (Translation/TTS/Misc)."
)

View File

@ -9159,3 +9159,11 @@ MSG_HASH(
MENU_ENUM_SUBLABEL_SETTINGS_SHOW_INPUT,
"Show or hide 'Input Settings' on the Settings screen."
)
MSG_HASH(
MENU_ENUM_LABEL_VALUE_AI_SERVICE_SETTINGS,
"AI Service"
)
MSG_HASH(
MENU_ENUM_SUBLABEL_AI_SERVICE_SETTINGS,
"Change settings for the AI Service (Translation/TTS/Misc)."
)

View File

@ -8991,3 +8991,11 @@ MSG_HASH(
MENU_ENUM_SUBLABEL_SETTINGS_SHOW_INPUT,
"Show or hide 'Input Settings' on the Settings screen."
)
MSG_HASH(
MENU_ENUM_LABEL_VALUE_AI_SERVICE_SETTINGS,
"AI Service"
)
MSG_HASH(
MENU_ENUM_SUBLABEL_AI_SERVICE_SETTINGS,
"Change settings for the AI Service (Translation/TTS/Misc)."
)

View File

@ -357,6 +357,8 @@ MSG_HASH(MENU_ENUM_LABEL_DEFERRED_INPUT_SETTINGS_LIST,
"deferred_input_settings_list")
MSG_HASH(MENU_ENUM_LABEL_DEFERRED_LATENCY_SETTINGS_LIST,
"deferred_latency_settings_list")
MSG_HASH(MENU_ENUM_LABEL_DEFERRED_AI_SERVICE_SETTINGS_LIST,
"deferred_ai_service_settings_list")
MSG_HASH(MENU_ENUM_LABEL_DEFERRED_LAKKA_LIST,
"deferred_lakka_list")
MSG_HASH(MENU_ENUM_LABEL_DEFERRED_LAKKA_SERVICES_LIST,
@ -1991,3 +1993,5 @@ MSG_HASH(MENU_ENUM_LABEL_QUICK_MENU_SHOW_CLOSE_CONTENT,
"quick_menu_show_close_content")
MSG_HASH(MENU_ENUM_LABEL_SETTINGS_SHOW_INPUT,
"settings_show_input")
MSG_HASH(MENU_ENUM_LABEL_AI_SERVICE_SETTINGS,
"ai_service_settings")

View File

@ -3520,3 +3520,11 @@ MSG_HASH(
MENU_ENUM_SUBLABEL_SETTINGS_SHOW_INPUT,
"Show or hide 'Input Settings' on the Settings screen."
)
MSG_HASH(
MENU_ENUM_LABEL_VALUE_AI_SERVICE_SETTINGS,
"AI Service"
)
MSG_HASH(
MENU_ENUM_SUBLABEL_AI_SERVICE_SETTINGS,
"Change settings for the AI Service (Translation/TTS/Misc)."
)

View File

@ -4311,3 +4311,11 @@ MSG_HASH(
MENU_ENUM_SUBLABEL_SETTINGS_SHOW_INPUT,
"Show or hide 'Input Settings' on the Settings screen."
)
MSG_HASH(
MENU_ENUM_LABEL_VALUE_AI_SERVICE_SETTINGS,
"AI Service"
)
MSG_HASH(
MENU_ENUM_SUBLABEL_AI_SERVICE_SETTINGS,
"Change settings for the AI Service (Translation/TTS/Misc)."
)

View File

@ -9071,3 +9071,11 @@ MSG_HASH(
MENU_ENUM_SUBLABEL_SETTINGS_SHOW_INPUT,
"Show or hide 'Input Settings' on the Settings screen."
)
MSG_HASH(
MENU_ENUM_LABEL_VALUE_AI_SERVICE_SETTINGS,
"AI Service"
)
MSG_HASH(
MENU_ENUM_SUBLABEL_AI_SERVICE_SETTINGS,
"Change settings for the AI Service (Translation/TTS/Misc)."
)

View File

@ -3592,3 +3592,11 @@ MSG_HASH(
MENU_ENUM_SUBLABEL_SETTINGS_SHOW_INPUT,
"Show or hide 'Input Settings' on the Settings screen."
)
MSG_HASH(
MENU_ENUM_LABEL_VALUE_AI_SERVICE_SETTINGS,
"AI Service"
)
MSG_HASH(
MENU_ENUM_SUBLABEL_AI_SERVICE_SETTINGS,
"Change settings for the AI Service (Translation/TTS/Misc)."
)

View File

@ -3790,3 +3790,11 @@ MSG_HASH(
MENU_ENUM_SUBLABEL_SETTINGS_SHOW_INPUT,
"Show or hide 'Input Settings' on the Settings screen."
)
MSG_HASH(
MENU_ENUM_LABEL_VALUE_AI_SERVICE_SETTINGS,
"AI Service"
)
MSG_HASH(
MENU_ENUM_SUBLABEL_AI_SERVICE_SETTINGS,
"Change settings for the AI Service (Translation/TTS/Misc)."
)

View File

@ -8796,3 +8796,11 @@ MSG_HASH(
MENU_ENUM_SUBLABEL_SETTINGS_SHOW_INPUT,
"Show or hide 'Input Settings' on the Settings screen."
)
MSG_HASH(
MENU_ENUM_LABEL_VALUE_AI_SERVICE_SETTINGS,
"AI Service"
)
MSG_HASH(
MENU_ENUM_SUBLABEL_AI_SERVICE_SETTINGS,
"Change settings for the AI Service (Translation/TTS/Misc)."
)

View File

@ -9135,3 +9135,11 @@ MSG_HASH(
MENU_ENUM_SUBLABEL_SETTINGS_SHOW_INPUT,
"Show or hide 'Input Settings' on the Settings screen."
)
MSG_HASH(
MENU_ENUM_LABEL_VALUE_AI_SERVICE_SETTINGS,
"AI Service"
)
MSG_HASH(
MENU_ENUM_SUBLABEL_AI_SERVICE_SETTINGS,
"Change settings for the AI Service (Translation/TTS/Misc)."
)

View File

@ -3682,3 +3682,11 @@ MSG_HASH(
MENU_ENUM_SUBLABEL_SETTINGS_SHOW_INPUT,
"Show or hide 'Input Settings' on the Settings screen."
)
MSG_HASH(
MENU_ENUM_LABEL_VALUE_AI_SERVICE_SETTINGS,
"AI Service"
)
MSG_HASH(
MENU_ENUM_SUBLABEL_AI_SERVICE_SETTINGS,
"Change settings for the AI Service (Translation/TTS/Misc)."
)

View File

@ -177,6 +177,7 @@ generic_deferred_push(deferred_push_midi_settings_list, DISPLAYLIST_
generic_deferred_push(deferred_push_audio_settings_list, DISPLAYLIST_AUDIO_SETTINGS_LIST)
generic_deferred_push(deferred_push_audio_mixer_settings_list, DISPLAYLIST_AUDIO_MIXER_SETTINGS_LIST)
generic_deferred_push(deferred_push_input_settings_list, DISPLAYLIST_INPUT_SETTINGS_LIST)
generic_deferred_push(deferred_push_ai_service_settings_list, DISPLAYLIST_AI_SERVICE_SETTINGS_LIST)
generic_deferred_push(deferred_push_latency_settings_list, DISPLAYLIST_LATENCY_SETTINGS_LIST)
generic_deferred_push(deferred_push_recording_settings_list, DISPLAYLIST_RECORDING_SETTINGS_LIST)
generic_deferred_push(deferred_push_playlist_settings_list, DISPLAYLIST_PLAYLIST_SETTINGS_LIST)
@ -930,6 +931,11 @@ static int menu_cbs_init_bind_deferred_push_compare_label(
{
BIND_ACTION_DEFERRED_PUSH(cbs, deferred_push_input_settings_list);
}
else if (strstr(label,
msg_hash_to_str(MENU_ENUM_LABEL_DEFERRED_AI_SERVICE_SETTINGS_LIST)))
{
BIND_ACTION_DEFERRED_PUSH(cbs, deferred_push_ai_service_settings_list);
}
#ifdef HAVE_NETWORKING
else if (strstr(label,
msg_hash_to_str(MENU_ENUM_LABEL_DEFERRED_CORE_UPDATER_LIST)))

View File

@ -234,6 +234,8 @@ static enum msg_hash_enums action_ok_dl_to_enum(unsigned lbl)
return MENU_ENUM_LABEL_DEFERRED_QUICK_MENU_OVERRIDE_OPTIONS;
case ACTION_OK_DL_USER_INTERFACE_SETTINGS_LIST:
return MENU_ENUM_LABEL_DEFERRED_USER_INTERFACE_SETTINGS_LIST;
case ACTION_OK_DL_AI_SERVICE_SETTINGS_LIST:
return MENU_ENUM_LABEL_DEFERRED_AI_SERVICE_SETTINGS_LIST;
case ACTION_OK_DL_POWER_MANAGEMENT_SETTINGS_LIST:
return MENU_ENUM_LABEL_DEFERRED_POWER_MANAGEMENT_SETTINGS_LIST;
case ACTION_OK_DL_MENU_SOUNDS_LIST:
@ -1010,6 +1012,7 @@ int generic_action_ok_displaylist_push(const char *path,
case ACTION_OK_DL_QUICK_MENU_VIEWS_SETTINGS_LIST:
case ACTION_OK_DL_QUICK_MENU_OVERRIDE_OPTIONS_LIST:
case ACTION_OK_DL_USER_INTERFACE_SETTINGS_LIST:
case ACTION_OK_DL_AI_SERVICE_SETTINGS_LIST:
case ACTION_OK_DL_POWER_MANAGEMENT_SETTINGS_LIST:
case ACTION_OK_DL_MENU_SOUNDS_LIST:
case ACTION_OK_DL_MENU_FILE_BROWSER_SETTINGS_LIST:
@ -4641,6 +4644,7 @@ default_action_ok_func(action_ok_push_audio_settings_list, ACTION_OK_DL_AUDIO_SE
#ifdef HAVE_AUDIOMIXER
default_action_ok_func(action_ok_push_audio_mixer_settings_list, ACTION_OK_DL_AUDIO_MIXER_SETTINGS_LIST)
#endif
default_action_ok_func(action_ok_push_ai_service_settings_list, ACTION_OK_DL_AI_SERVICE_SETTINGS_LIST)
default_action_ok_func(action_ok_push_input_settings_list, ACTION_OK_DL_INPUT_SETTINGS_LIST)
default_action_ok_func(action_ok_push_latency_settings_list, ACTION_OK_DL_LATENCY_SETTINGS_LIST)
default_action_ok_func(action_ok_push_recording_settings_list, ACTION_OK_DL_RECORDING_SETTINGS_LIST)
@ -6252,6 +6256,9 @@ static int menu_cbs_init_bind_ok_compare_label(menu_file_list_cbs_t *cbs,
case MENU_ENUM_LABEL_ACCOUNTS_LIST:
BIND_ACTION_OK(cbs, action_ok_push_accounts_list);
break;
case MENU_ENUM_LABEL_AI_SERVICE_SETTINGS:
BIND_ACTION_OK(cbs, action_ok_push_ai_service_settings_list);
break;
case MENU_ENUM_LABEL_INPUT_SETTINGS:
BIND_ACTION_OK(cbs, action_ok_push_input_settings_list);
break;

View File

@ -125,6 +125,7 @@ default_sublabel_macro(action_bind_sublabel_retro_achievements_settings_list, ME
default_sublabel_macro(action_bind_sublabel_saving_settings_list, MENU_ENUM_SUBLABEL_SAVING_SETTINGS)
default_sublabel_macro(action_bind_sublabel_logging_settings_list, MENU_ENUM_SUBLABEL_LOGGING_SETTINGS)
default_sublabel_macro(action_bind_sublabel_user_interface_settings_list, MENU_ENUM_SUBLABEL_USER_INTERFACE_SETTINGS)
default_sublabel_macro(action_bind_sublabel_ai_service_settings_list, MENU_ENUM_SUBLABEL_AI_SERVICE_SETTINGS)
default_sublabel_macro(action_bind_sublabel_power_management_settings_list, MENU_ENUM_SUBLABEL_POWER_MANAGEMENT_SETTINGS)
default_sublabel_macro(action_bind_sublabel_privacy_settings_list, MENU_ENUM_SUBLABEL_PRIVACY_SETTINGS)
default_sublabel_macro(action_bind_sublabel_midi_settings_list, MENU_ENUM_SUBLABEL_MIDI_SETTINGS)
@ -2540,6 +2541,9 @@ int menu_cbs_init_bind_sublabel(menu_file_list_cbs_t *cbs,
BIND_ACTION_SUBLABEL(cbs, action_bind_sublabel_left_thumbnails);
}
break;
case MENU_ENUM_LABEL_AI_SERVICE_SETTINGS:
BIND_ACTION_SUBLABEL(cbs, action_bind_sublabel_ai_service_settings_list);
break;
case MENU_ENUM_LABEL_USER_INTERFACE_SETTINGS:
BIND_ACTION_SUBLABEL(cbs, action_bind_sublabel_user_interface_settings_list);
break;

View File

@ -182,6 +182,7 @@ default_title_macro(action_get_settings_views_settings_list, MENU_ENUM_LABEL_VA
default_title_macro(action_get_quick_menu_views_settings_list, MENU_ENUM_LABEL_VALUE_QUICK_MENU_VIEWS_SETTINGS)
default_title_macro(action_get_menu_settings_list, MENU_ENUM_LABEL_VALUE_MENU_SETTINGS)
default_title_macro(action_get_user_interface_settings_list, MENU_ENUM_LABEL_VALUE_USER_INTERFACE_SETTINGS)
default_title_macro(action_get_ai_service_settings_list, MENU_ENUM_LABEL_VALUE_AI_SERVICE_SETTINGS)
default_title_macro(action_get_power_management_settings_list, MENU_ENUM_LABEL_VALUE_POWER_MANAGEMENT_SETTINGS)
default_title_macro(action_get_menu_sounds_list, MENU_ENUM_LABEL_VALUE_MENU_SOUNDS)
default_title_macro(action_get_menu_file_browser_settings_list, MENU_ENUM_LABEL_VALUE_MENU_FILE_BROWSER_SETTINGS)
@ -510,6 +511,11 @@ static int menu_cbs_init_bind_title_compare_label(menu_file_list_cbs_t *cbs,
BIND_ACTION_GET_TITLE(cbs, action_get_user_interface_settings_list);
return 0;
}
else if (string_is_equal(label, msg_hash_to_str(MENU_ENUM_LABEL_DEFERRED_AI_SERVICE_SETTINGS_LIST)))
{
BIND_ACTION_GET_TITLE(cbs, action_get_ai_service_settings_list);
return 0;
}
else if (string_is_equal(label, msg_hash_to_str(MENU_ENUM_LABEL_DEFERRED_POWER_MANAGEMENT_SETTINGS_LIST)))
{
BIND_ACTION_GET_TITLE(cbs, action_get_power_management_settings_list);

View File

@ -143,6 +143,7 @@ enum
ACTION_OK_DL_QUICK_MENU_VIEWS_SETTINGS_LIST,
ACTION_OK_DL_QUICK_MENU_OVERRIDE_OPTIONS_LIST,
ACTION_OK_DL_MENU_SETTINGS_LIST,
ACTION_OK_DL_AI_SERVICE_SETTINGS_LIST,
ACTION_OK_DL_USER_INTERFACE_SETTINGS_LIST,
ACTION_OK_DL_POWER_MANAGEMENT_SETTINGS_LIST,
ACTION_OK_DL_MENU_SOUNDS_LIST,

View File

@ -4794,6 +4794,7 @@ unsigned menu_displaylist_build_list(file_list_t *list, enum menu_displaylist_ct
{MENU_ENUM_LABEL_RECORDING_SETTINGS,PARSE_ACTION, true},
{MENU_ENUM_LABEL_ONSCREEN_DISPLAY_SETTINGS,PARSE_ACTION, true},
{MENU_ENUM_LABEL_USER_INTERFACE_SETTINGS, PARSE_ACTION, true},
{MENU_ENUM_LABEL_AI_SERVICE_SETTINGS, PARSE_ACTION, true},
{MENU_ENUM_LABEL_POWER_MANAGEMENT_SETTINGS,PARSE_ACTION, true},
{MENU_ENUM_LABEL_RETRO_ACHIEVEMENTS_SETTINGS,PARSE_ACTION, true},
{MENU_ENUM_LABEL_WIFI_SETTINGS,PARSE_ACTION, true},
@ -4810,6 +4811,11 @@ unsigned menu_displaylist_build_list(file_list_t *list, enum menu_displaylist_ct
{
switch (build_list[i].enum_idx)
{
case MENU_ENUM_LABEL_AI_SERVICE_SETTINGS:
#ifndef HAVE_TRANSLATE
build_list[i].checked = false;
#endif
break;
case MENU_ENUM_LABEL_INPUT_SETTINGS:
build_list[i].checked = settings->bools.settings_show_input;
break;
@ -7339,6 +7345,19 @@ bool menu_displaylist_ctl(enum menu_displaylist_ctl_state type,
MENU_ENUM_LABEL_AUDIO_WASAPI_SH_BUFFER_LENGTH,
PARSE_ONLY_INT, false);
info->need_refresh = true;
info->need_push = true;
break;
case DISPLAYLIST_AI_SERVICE_SETTINGS_LIST:
menu_entries_ctl(MENU_ENTRIES_CTL_CLEAR, info->list);
if (count == 0)
menu_entries_append_enum(info->list,
msg_hash_to_str(MENU_ENUM_LABEL_VALUE_NO_SETTINGS_FOUND),
msg_hash_to_str(MENU_ENUM_LABEL_NO_SETTINGS_FOUND),
MENU_ENUM_LABEL_NO_SETTINGS_FOUND,
0, 0, 0);
info->need_refresh = true;
info->need_push = true;
break;

View File

@ -147,6 +147,7 @@ enum menu_displaylist_ctl_state
DISPLAYLIST_LATENCY_SETTINGS_LIST,
DISPLAYLIST_INPUT_HOTKEY_BINDS_LIST,
DISPLAYLIST_ONSCREEN_OVERLAY_SETTINGS_LIST,
DISPLAYLIST_AI_SERVICE_SETTINGS_LIST,
#ifdef HAVE_VIDEO_LAYOUT
DISPLAYLIST_ONSCREEN_VIDEO_LAYOUT_SETTINGS_LIST,
#endif

View File

@ -7162,6 +7162,14 @@ static bool setting_append_list(
&subgroup_info,
parent_group);
CONFIG_ACTION(
list, list_info,
MENU_ENUM_LABEL_AI_SERVICE_SETTINGS,
MENU_ENUM_LABEL_VALUE_AI_SERVICE_SETTINGS,
&group_info,
&subgroup_info,
parent_group);
CONFIG_ACTION(
list, list_info,
MENU_ENUM_LABEL_POWER_MANAGEMENT_SETTINGS,

View File

@ -1221,6 +1221,7 @@ enum msg_hash_enums
MENU_ENUM_LABEL_DEFERRED_SAVING_SETTINGS_LIST,
MENU_ENUM_LABEL_DEFERRED_FRAME_THROTTLE_SETTINGS_LIST,
MENU_ENUM_LABEL_DEFERRED_REWIND_SETTINGS_LIST,
MENU_ENUM_LABEL_DEFERRED_AI_SERVICE_SETTINGS_LIST,
MENU_ENUM_LABEL_DEFERRED_CHEAT_DETAILS_SETTINGS_LIST,
MENU_ENUM_LABEL_DEFERRED_CHEAT_SEARCH_SETTINGS_LIST,
MENU_ENUM_LABEL_DEFERRED_ONSCREEN_DISPLAY_SETTINGS_LIST,
@ -1667,6 +1668,7 @@ enum msg_hash_enums
MENU_LABEL(PLAYLISTS_TAB),
MENU_LABEL(MAIN_MENU),
MENU_LABEL(INPUT_SETTINGS),
MENU_LABEL(AI_SERVICE_SETTINGS),
MENU_LABEL(ON),
MENU_LABEL(OFF),