(Menu) Create Settings -> Video -> Fullscreen and Windowed submenus

This commit is contained in:
twinaphex 2019-12-19 18:53:51 +01:00
parent 36af159991
commit e8babede53
10 changed files with 130 additions and 36 deletions

View File

@ -431,6 +431,10 @@ MSG_HASH(MENU_ENUM_LABEL_DEFERRED_VIDEO_FILTER,
"deferred_video_filter")
MSG_HASH(MENU_ENUM_LABEL_DEFERRED_VIDEO_SETTINGS_LIST,
"deferred_video_settings_list")
MSG_HASH(MENU_ENUM_LABEL_DEFERRED_VIDEO_WINDOWED_MODE_SETTINGS_LIST,
"deferred_video_windowed_mode_settings_list")
MSG_HASH(MENU_ENUM_LABEL_DEFERRED_VIDEO_FULLSCREEN_MODE_SETTINGS_LIST,
"deferred_video_fullscreen_mode_settings_list")
MSG_HASH(MENU_ENUM_LABEL_DEFERRED_VIDEO_SCALING_SETTINGS_LIST,
"deferred_video_scaling_settings_list")
MSG_HASH(MENU_ENUM_LABEL_DEFERRED_CRT_SWITCHRES_SETTINGS_LIST,
@ -1407,6 +1411,10 @@ MSG_HASH(MENU_ENUM_LABEL_VIDEO_SCALE_INTEGER,
"video_scale_integer")
MSG_HASH(MENU_ENUM_LABEL_VIDEO_SETTINGS,
"video_settings")
MSG_HASH(MENU_ENUM_LABEL_VIDEO_WINDOWED_MODE_SETTINGS,
"video_windowed_mode_settings")
MSG_HASH(MENU_ENUM_LABEL_VIDEO_FULLSCREEN_MODE_SETTINGS,
"video_fullscreen_mode_settings")
MSG_HASH(MENU_ENUM_LABEL_VIDEO_SCALING_SETTINGS,
"video_scaling_settings")
MSG_HASH(MENU_ENUM_LABEL_CRT_SWITCHRES_SETTINGS,

View File

@ -10204,3 +10204,19 @@ MSG_HASH(
MENU_ENUM_SUBLABEL_VIDEO_SCALING_SETTINGS,
"Change video scaling settings."
)
MSG_HASH(
MENU_ENUM_LABEL_VALUE_VIDEO_FULLSCREEN_MODE_SETTINGS,
"Fullscreen Mode"
)
MSG_HASH(
MENU_ENUM_SUBLABEL_VIDEO_FULLSCREEN_MODE_SETTINGS,
"Change fullscreen mode settings."
)
MSG_HASH(
MENU_ENUM_LABEL_VALUE_VIDEO_WINDOWED_MODE_SETTINGS,
"Windowed Mode"
)
MSG_HASH(
MENU_ENUM_SUBLABEL_VIDEO_WINDOWED_MODE_SETTINGS,
"Change windowed mode settings."
)

View File

@ -145,6 +145,8 @@ generic_deferred_push(deferred_push_accounts_list, DISPLAYLIST_
generic_deferred_push(deferred_push_driver_settings_list, DISPLAYLIST_DRIVER_SETTINGS_LIST)
generic_deferred_push(deferred_push_core_settings_list, DISPLAYLIST_CORE_SETTINGS_LIST)
generic_deferred_push(deferred_push_video_settings_list, DISPLAYLIST_VIDEO_SETTINGS_LIST)
generic_deferred_push(deferred_push_video_fullscreen_mode_settings_list, DISPLAYLIST_VIDEO_FULLSCREEN_MODE_SETTINGS_LIST)
generic_deferred_push(deferred_push_video_windowed_mode_settings_list, DISPLAYLIST_VIDEO_WINDOWED_MODE_SETTINGS_LIST)
generic_deferred_push(deferred_push_video_scaling_settings_list, DISPLAYLIST_VIDEO_SCALING_SETTINGS_LIST)
generic_deferred_push(deferred_push_crt_switchres_settings_list, DISPLAYLIST_CRT_SWITCHRES_SETTINGS_LIST)
generic_deferred_push(deferred_push_configuration_settings_list, DISPLAYLIST_CONFIGURATION_SETTINGS_LIST)
@ -724,6 +726,8 @@ static int menu_cbs_init_bind_deferred_push_compare_label(
{MENU_ENUM_LABEL_DEFERRED_NETPLAY, deferred_push_netplay_sublist},
{MENU_ENUM_LABEL_DEFERRED_DRIVER_SETTINGS_LIST, deferred_push_driver_settings_list},
{MENU_ENUM_LABEL_DEFERRED_VIDEO_SETTINGS_LIST, deferred_push_video_settings_list},
{MENU_ENUM_LABEL_DEFERRED_VIDEO_FULLSCREEN_MODE_SETTINGS_LIST, deferred_push_video_fullscreen_mode_settings_list},
{MENU_ENUM_LABEL_DEFERRED_VIDEO_WINDOWED_MODE_SETTINGS_LIST, deferred_push_video_windowed_mode_settings_list},
{MENU_ENUM_LABEL_DEFERRED_VIDEO_SCALING_SETTINGS_LIST, deferred_push_video_scaling_settings_list},
{MENU_ENUM_LABEL_DEFERRED_CRT_SWITCHRES_SETTINGS_LIST, deferred_push_crt_switchres_settings_list},
{MENU_ENUM_LABEL_DEFERRED_AUDIO_SETTINGS_LIST, deferred_push_audio_settings_list},
@ -1057,6 +1061,12 @@ static int menu_cbs_init_bind_deferred_push_compare_label(
case MENU_ENUM_LABEL_DEFERRED_VIDEO_SETTINGS_LIST:
BIND_ACTION_DEFERRED_PUSH(cbs, deferred_push_video_settings_list);
break;
case MENU_ENUM_LABEL_DEFERRED_VIDEO_FULLSCREEN_MODE_SETTINGS_LIST:
BIND_ACTION_DEFERRED_PUSH(cbs, deferred_push_video_fullscreen_mode_settings_list);
break;
case MENU_ENUM_LABEL_DEFERRED_VIDEO_WINDOWED_MODE_SETTINGS_LIST:
BIND_ACTION_DEFERRED_PUSH(cbs, deferred_push_video_windowed_mode_settings_list);
break;
case MENU_ENUM_LABEL_DEFERRED_VIDEO_SCALING_SETTINGS_LIST:
BIND_ACTION_DEFERRED_PUSH(cbs, deferred_push_video_scaling_settings_list);
break;

View File

@ -202,6 +202,10 @@ static enum msg_hash_enums action_ok_dl_to_enum(unsigned lbl)
return MENU_ENUM_LABEL_DEFERRED_CORE_SETTINGS_LIST;
case ACTION_OK_DL_VIDEO_SETTINGS_LIST:
return MENU_ENUM_LABEL_DEFERRED_VIDEO_SETTINGS_LIST;
case ACTION_OK_DL_VIDEO_FULLSCREEN_MODE_SETTINGS_LIST:
return MENU_ENUM_LABEL_DEFERRED_VIDEO_FULLSCREEN_MODE_SETTINGS_LIST;
case ACTION_OK_DL_VIDEO_WINDOWED_MODE_SETTINGS_LIST:
return MENU_ENUM_LABEL_DEFERRED_VIDEO_WINDOWED_MODE_SETTINGS_LIST;
case ACTION_OK_DL_VIDEO_SCALING_SETTINGS_LIST:
return MENU_ENUM_LABEL_DEFERRED_VIDEO_SCALING_SETTINGS_LIST;
case ACTION_OK_DL_CRT_SWITCHRES_SETTINGS_LIST:
@ -1013,6 +1017,8 @@ int generic_action_ok_displaylist_push(const char *path,
case ACTION_OK_DL_DRIVER_SETTINGS_LIST:
case ACTION_OK_DL_CORE_SETTINGS_LIST:
case ACTION_OK_DL_VIDEO_SETTINGS_LIST:
case ACTION_OK_DL_VIDEO_FULLSCREEN_MODE_SETTINGS_LIST:
case ACTION_OK_DL_VIDEO_WINDOWED_MODE_SETTINGS_LIST:
case ACTION_OK_DL_VIDEO_SCALING_SETTINGS_LIST:
case ACTION_OK_DL_CRT_SWITCHRES_SETTINGS_LIST:
case ACTION_OK_DL_CONFIGURATION_SETTINGS_LIST:
@ -4730,6 +4736,8 @@ default_action_ok_func(action_ok_push_accounts_list, ACTION_OK_DL_ACCOUNTS_LIST)
default_action_ok_func(action_ok_push_driver_settings_list, ACTION_OK_DL_DRIVER_SETTINGS_LIST)
default_action_ok_func(action_ok_push_crt_switchres_settings_list, ACTION_OK_DL_CRT_SWITCHRES_SETTINGS_LIST)
default_action_ok_func(action_ok_push_video_settings_list, ACTION_OK_DL_VIDEO_SETTINGS_LIST)
default_action_ok_func(action_ok_push_video_fullscreen_mode_settings_list, ACTION_OK_DL_VIDEO_FULLSCREEN_MODE_SETTINGS_LIST)
default_action_ok_func(action_ok_push_video_windowed_mode_settings_list, ACTION_OK_DL_VIDEO_WINDOWED_MODE_SETTINGS_LIST)
default_action_ok_func(action_ok_push_video_scaling_settings_list, ACTION_OK_DL_VIDEO_SCALING_SETTINGS_LIST)
default_action_ok_func(action_ok_push_configuration_settings_list, ACTION_OK_DL_CONFIGURATION_SETTINGS_LIST)
default_action_ok_func(action_ok_push_core_settings_list, ACTION_OK_DL_CORE_SETTINGS_LIST)
@ -6385,6 +6393,12 @@ static int menu_cbs_init_bind_ok_compare_label(menu_file_list_cbs_t *cbs,
case MENU_ENUM_LABEL_VIDEO_SETTINGS:
BIND_ACTION_OK(cbs, action_ok_push_video_settings_list);
break;
case MENU_ENUM_LABEL_VIDEO_FULLSCREEN_MODE_SETTINGS:
BIND_ACTION_OK(cbs, action_ok_push_video_fullscreen_mode_settings_list);
break;
case MENU_ENUM_LABEL_VIDEO_WINDOWED_MODE_SETTINGS:
BIND_ACTION_OK(cbs, action_ok_push_video_windowed_mode_settings_list);
break;
case MENU_ENUM_LABEL_VIDEO_SCALING_SETTINGS:
BIND_ACTION_OK(cbs, action_ok_push_video_scaling_settings_list);
break;

View File

@ -172,6 +172,8 @@ default_sublabel_macro(action_bind_sublabel_quick_menu_views_settings_list, MENU
default_sublabel_macro(action_bind_sublabel_settings_views_settings_list, MENU_ENUM_SUBLABEL_SETTINGS_VIEWS_SETTINGS)
default_sublabel_macro(action_bind_sublabel_menu_settings_list, MENU_ENUM_SUBLABEL_MENU_SETTINGS)
default_sublabel_macro(action_bind_sublabel_video_settings_list, MENU_ENUM_SUBLABEL_VIDEO_SETTINGS)
default_sublabel_macro(action_bind_sublabel_video_fullscreen_mode_settings_list, MENU_ENUM_SUBLABEL_VIDEO_FULLSCREEN_MODE_SETTINGS)
default_sublabel_macro(action_bind_sublabel_video_windowed_mode_settings_list, MENU_ENUM_SUBLABEL_VIDEO_WINDOWED_MODE_SETTINGS)
default_sublabel_macro(action_bind_sublabel_video_scaling_settings_list, MENU_ENUM_SUBLABEL_VIDEO_SCALING_SETTINGS)
default_sublabel_macro(action_bind_sublabel_crt_switchres_settings_list, MENU_ENUM_SUBLABEL_CRT_SWITCHRES_SETTINGS)
default_sublabel_macro(action_bind_sublabel_suspend_screensaver_enable, MENU_ENUM_SUBLABEL_SUSPEND_SCREENSAVER_ENABLE)
@ -2696,6 +2698,12 @@ int menu_cbs_init_bind_sublabel(menu_file_list_cbs_t *cbs,
case MENU_ENUM_LABEL_VIDEO_SETTINGS:
BIND_ACTION_SUBLABEL(cbs, action_bind_sublabel_video_settings_list);
break;
case MENU_ENUM_LABEL_VIDEO_FULLSCREEN_MODE_SETTINGS:
BIND_ACTION_SUBLABEL(cbs, action_bind_sublabel_video_fullscreen_mode_settings_list);
break;
case MENU_ENUM_LABEL_VIDEO_WINDOWED_MODE_SETTINGS:
BIND_ACTION_SUBLABEL(cbs, action_bind_sublabel_video_windowed_mode_settings_list);
break;
case MENU_ENUM_LABEL_VIDEO_SCALING_SETTINGS:
BIND_ACTION_SUBLABEL(cbs, action_bind_sublabel_video_scaling_settings_list);
break;

View File

@ -82,6 +82,8 @@ enum
ACTION_OK_DL_INPUT_SETTINGS_LIST,
ACTION_OK_DL_DRIVER_SETTINGS_LIST,
ACTION_OK_DL_VIDEO_SETTINGS_LIST,
ACTION_OK_DL_VIDEO_FULLSCREEN_MODE_SETTINGS_LIST,
ACTION_OK_DL_VIDEO_WINDOWED_MODE_SETTINGS_LIST,
ACTION_OK_DL_VIDEO_SCALING_SETTINGS_LIST,
ACTION_OK_DL_CRT_SWITCHRES_SETTINGS_LIST,
ACTION_OK_DL_AUDIO_SETTINGS_LIST,

View File

@ -4198,20 +4198,8 @@ unsigned menu_displaylist_build_list(file_list_t *list, enum menu_displaylist_ct
PARSE_ONLY_INT, false) == 0)
count++;
if (menu_displaylist_parse_settings_enum(list,
MENU_ENUM_LABEL_VIDEO_FULLSCREEN,
PARSE_ONLY_BOOL, false) == 0)
count++;
if (menu_displaylist_parse_settings_enum(list,
MENU_ENUM_LABEL_VIDEO_WINDOWED_FULLSCREEN,
PARSE_ONLY_BOOL, false) == 0)
count++;
if (menu_displaylist_parse_settings_enum(list,
MENU_ENUM_LABEL_VIDEO_FULLSCREEN_X,
PARSE_ONLY_UINT, false) == 0)
count++;
if (menu_displaylist_parse_settings_enum(list,
MENU_ENUM_LABEL_VIDEO_FULLSCREEN_Y,
PARSE_ONLY_UINT, false) == 0)
MENU_ENUM_LABEL_VIDEO_FULLSCREEN_MODE_SETTINGS,
PARSE_ACTION, false) == 0)
count++;
if (menu_displaylist_parse_settings_enum(list,
MENU_ENUM_LABEL_VIDEO_REFRESH_RATE,
@ -4234,28 +4222,8 @@ unsigned menu_displaylist_build_list(file_list_t *list, enum menu_displaylist_ct
PARSE_ACTION, false) == 0)
count++;
if (menu_displaylist_parse_settings_enum(list,
MENU_ENUM_LABEL_VIDEO_SCALE,
PARSE_ONLY_FLOAT, false) == 0)
count++;
if (menu_displaylist_parse_settings_enum(list,
MENU_ENUM_LABEL_VIDEO_WINDOW_OPACITY,
PARSE_ONLY_UINT, false) == 0)
count++;
if (menu_displaylist_parse_settings_enum(list,
MENU_ENUM_LABEL_VIDEO_WINDOW_SHOW_DECORATIONS,
PARSE_ONLY_BOOL, false) == 0)
count++;
if (menu_displaylist_parse_settings_enum(list,
MENU_ENUM_LABEL_VIDEO_WINDOW_SAVE_POSITION,
PARSE_ONLY_BOOL, false) == 0)
count++;
if (menu_displaylist_parse_settings_enum(list,
MENU_ENUM_LABEL_VIDEO_WINDOW_WIDTH,
PARSE_ONLY_UINT, false) == 0)
count++;
if (menu_displaylist_parse_settings_enum(list,
MENU_ENUM_LABEL_VIDEO_WINDOW_HEIGHT,
PARSE_ONLY_UINT, false) == 0)
MENU_ENUM_LABEL_VIDEO_WINDOWED_MODE_SETTINGS,
PARSE_ACTION, false) == 0)
count++;
if (menu_displaylist_parse_settings_enum(list,
MENU_ENUM_LABEL_VIDEO_VI_WIDTH,
@ -5644,6 +5612,50 @@ unsigned menu_displaylist_build_list(file_list_t *list, enum menu_displaylist_ct
}
}
break;
case DISPLAYLIST_VIDEO_WINDOWED_MODE_SETTINGS_LIST:
if (menu_displaylist_parse_settings_enum(list,
MENU_ENUM_LABEL_VIDEO_SCALE,
PARSE_ONLY_FLOAT, false) == 0)
count++;
if (menu_displaylist_parse_settings_enum(list,
MENU_ENUM_LABEL_VIDEO_WINDOW_OPACITY,
PARSE_ONLY_UINT, false) == 0)
count++;
if (menu_displaylist_parse_settings_enum(list,
MENU_ENUM_LABEL_VIDEO_WINDOW_SHOW_DECORATIONS,
PARSE_ONLY_BOOL, false) == 0)
count++;
if (menu_displaylist_parse_settings_enum(list,
MENU_ENUM_LABEL_VIDEO_WINDOW_SAVE_POSITION,
PARSE_ONLY_BOOL, false) == 0)
count++;
if (menu_displaylist_parse_settings_enum(list,
MENU_ENUM_LABEL_VIDEO_WINDOW_WIDTH,
PARSE_ONLY_UINT, false) == 0)
count++;
if (menu_displaylist_parse_settings_enum(list,
MENU_ENUM_LABEL_VIDEO_WINDOW_HEIGHT,
PARSE_ONLY_UINT, false) == 0)
count++;
break;
case DISPLAYLIST_VIDEO_FULLSCREEN_MODE_SETTINGS_LIST:
if (menu_displaylist_parse_settings_enum(list,
MENU_ENUM_LABEL_VIDEO_FULLSCREEN,
PARSE_ONLY_BOOL, false) == 0)
count++;
if (menu_displaylist_parse_settings_enum(list,
MENU_ENUM_LABEL_VIDEO_WINDOWED_FULLSCREEN,
PARSE_ONLY_BOOL, false) == 0)
count++;
if (menu_displaylist_parse_settings_enum(list,
MENU_ENUM_LABEL_VIDEO_FULLSCREEN_X,
PARSE_ONLY_UINT, false) == 0)
count++;
if (menu_displaylist_parse_settings_enum(list,
MENU_ENUM_LABEL_VIDEO_FULLSCREEN_Y,
PARSE_ONLY_UINT, false) == 0)
count++;
break;
case DISPLAYLIST_VIDEO_SCALING_SETTINGS_LIST:
if (menu_displaylist_parse_settings_enum(list,
MENU_ENUM_LABEL_VIDEO_SCALE_INTEGER,
@ -8212,6 +8224,8 @@ bool menu_displaylist_ctl(enum menu_displaylist_ctl_state type,
case DISPLAYLIST_LAKKA_SERVICES_LIST:
case DISPLAYLIST_MIDI_SETTINGS_LIST:
case DISPLAYLIST_CRT_SWITCHRES_SETTINGS_LIST:
case DISPLAYLIST_VIDEO_FULLSCREEN_MODE_SETTINGS_LIST:
case DISPLAYLIST_VIDEO_WINDOWED_MODE_SETTINGS_LIST:
case DISPLAYLIST_VIDEO_SCALING_SETTINGS_LIST:
case DISPLAYLIST_OPTIONS_DISK:
case DISPLAYLIST_AI_SERVICE_SETTINGS_LIST:

View File

@ -135,6 +135,8 @@ enum menu_displaylist_ctl_state
DISPLAYLIST_ACCOUNTS_LIST,
DISPLAYLIST_MIXER_STREAM_SETTINGS_LIST,
DISPLAYLIST_DRIVER_SETTINGS_LIST,
DISPLAYLIST_VIDEO_FULLSCREEN_MODE_SETTINGS_LIST,
DISPLAYLIST_VIDEO_WINDOWED_MODE_SETTINGS_LIST,
DISPLAYLIST_VIDEO_SCALING_SETTINGS_LIST,
DISPLAYLIST_CRT_SWITCHRES_SETTINGS_LIST,
DISPLAYLIST_VIDEO_SETTINGS_LIST,

View File

@ -9363,6 +9363,22 @@ static bool setting_append_list(
}
#endif
CONFIG_ACTION(
list, list_info,
MENU_ENUM_LABEL_VIDEO_FULLSCREEN_MODE_SETTINGS,
MENU_ENUM_LABEL_VALUE_VIDEO_FULLSCREEN_MODE_SETTINGS,
&group_info,
&subgroup_info,
parent_group);
CONFIG_ACTION(
list, list_info,
MENU_ENUM_LABEL_VIDEO_WINDOWED_MODE_SETTINGS,
MENU_ENUM_LABEL_VALUE_VIDEO_WINDOWED_MODE_SETTINGS,
&group_info,
&subgroup_info,
parent_group);
if (video_driver_has_windowed())
{
CONFIG_BOOL(

View File

@ -1305,6 +1305,8 @@ enum msg_hash_enums
MENU_ENUM_LABEL_DEFERRED_LATENCY_SETTINGS_LIST,
MENU_ENUM_LABEL_DEFERRED_DRIVER_SETTINGS_LIST,
MENU_ENUM_LABEL_DEFERRED_VIDEO_SETTINGS_LIST,
MENU_ENUM_LABEL_DEFERRED_VIDEO_WINDOWED_MODE_SETTINGS_LIST,
MENU_ENUM_LABEL_DEFERRED_VIDEO_FULLSCREEN_MODE_SETTINGS_LIST,
MENU_ENUM_LABEL_DEFERRED_VIDEO_SCALING_SETTINGS_LIST,
MENU_ENUM_LABEL_DEFERRED_CRT_SWITCHRES_SETTINGS_LIST,
MENU_ENUM_LABEL_DEFERRED_CONFIGURATION_SETTINGS_LIST,
@ -1930,6 +1932,8 @@ enum msg_hash_enums
MENU_LABEL(JOYPAD_AUTOCONFIG_DIR),
MENU_LABEL(DRIVER_SETTINGS),
MENU_LABEL(VIDEO_SETTINGS),
MENU_LABEL(VIDEO_WINDOWED_MODE_SETTINGS),
MENU_LABEL(VIDEO_FULLSCREEN_MODE_SETTINGS),
MENU_LABEL(VIDEO_SCALING_SETTINGS),
MENU_LABEL(CRT_SWITCHRES_SETTINGS),
MENU_LABEL(AUDIO_SETTINGS),