diff --git a/intl/msg_hash_us.h b/intl/msg_hash_us.h index d5d77dd606..0af56c7a4d 100644 --- a/intl/msg_hash_us.h +++ b/intl/msg_hash_us.h @@ -7359,6 +7359,10 @@ MSG_HASH( MENU_ENUM_LABEL_VALUE_RGUI_ASPECT_RATIO_LOCK_INTEGER, "Integer Scale" ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_RGUI_ASPECT_RATIO_LOCK_FILL_SCREEN, + "Fill Screen (Stretched)" + ) MSG_HASH( MENU_ENUM_LABEL_VALUE_RGUI_MENU_COLOR_THEME_CUSTOM, "Custom" diff --git a/menu/drivers/rgui.c b/menu/drivers/rgui.c index 454436e71e..43f6134000 100644 --- a/menu/drivers/rgui.c +++ b/menu/drivers/rgui.c @@ -2201,7 +2201,7 @@ static void load_custom_theme(rgui_t *rgui, rgui_theme_t *theme_colors, const ch unsigned shadow_color = 0; unsigned particle_color = 0; config_file_t *conf = NULL; - char *wallpaper_key = NULL; + const char *wallpaper_key = NULL; settings_t *settings = config_get_ptr(); bool success = false; unsigned rgui_aspect_ratio = settings->uints.menu_rgui_aspect_ratio; @@ -4078,7 +4078,16 @@ static void rgui_update_menu_viewport(rgui_t *rgui) do_integer_scaling = false; } - if (!do_integer_scaling) + /* Check whether menu should be stretched to + * fill the screen, regardless of internal + * aspect ratio */ + if (aspect_ratio_lock == RGUI_ASPECT_RATIO_LOCK_FILL_SCREEN) + { + rgui->menu_video_settings.viewport.width = vp.full_width; + rgui->menu_video_settings.viewport.height = vp.full_height; + } + /* Normal non-integer aspect-ratio-correct scaling */ + else if (!do_integer_scaling) { float display_aspect_ratio = (float)vp.full_width / (float)vp.full_height; diff --git a/menu/menu_defines.h b/menu/menu_defines.h index 58c294c581..77972fb22d 100644 --- a/menu/menu_defines.h +++ b/menu/menu_defines.h @@ -309,6 +309,7 @@ enum rgui_aspect_ratio_lock RGUI_ASPECT_RATIO_LOCK_NONE = 0, RGUI_ASPECT_RATIO_LOCK_FIT_SCREEN, RGUI_ASPECT_RATIO_LOCK_INTEGER, + RGUI_ASPECT_RATIO_LOCK_FILL_SCREEN, RGUI_ASPECT_RATIO_LOCK_LAST }; diff --git a/menu/menu_setting.c b/menu/menu_setting.c index 5764bacf92..e238daf488 100644 --- a/menu/menu_setting.c +++ b/menu/menu_setting.c @@ -3693,6 +3693,12 @@ static void setting_get_string_representation_uint_rgui_aspect_ratio_lock( MENU_ENUM_LABEL_VALUE_RGUI_ASPECT_RATIO_LOCK_INTEGER), len); break; + case RGUI_ASPECT_RATIO_LOCK_FILL_SCREEN: + strlcpy(s, + msg_hash_to_str( + MENU_ENUM_LABEL_VALUE_RGUI_ASPECT_RATIO_LOCK_FILL_SCREEN), + len); + break; } } @@ -12909,7 +12915,7 @@ static bool setting_append_list( (*list)[list_info->index - 1].get_string_representation = &setting_get_string_representation_uint_rgui_aspect_ratio_lock; #if defined(GEKKO) - menu_settings_list_current_add_range(list, list_info, 0, RGUI_ASPECT_RATIO_LOCK_LAST-2, 1, true, true); + menu_settings_list_current_add_range(list, list_info, 0, RGUI_ASPECT_RATIO_LOCK_LAST-3, 1, true, true); #else menu_settings_list_current_add_range(list, list_info, 0, RGUI_ASPECT_RATIO_LOCK_LAST-1, 1, true, true); #endif diff --git a/msg_hash.h b/msg_hash.h index 5f836ad6d6..e489f3e457 100644 --- a/msg_hash.h +++ b/msg_hash.h @@ -2375,9 +2375,10 @@ enum msg_hash_enums MENU_ENUM_LABEL_VALUE_RGUI_ASPECT_RATIO_16_10, MENU_ENUM_LABEL_VALUE_RGUI_ASPECT_RATIO_16_10_CENTRE, - MENU_ENUM_LABEL_VALUE_RGUI_ASPECT_RATIO_LOCK_NONE, - MENU_ENUM_LABEL_VALUE_RGUI_ASPECT_RATIO_LOCK_FIT_SCREEN, - MENU_ENUM_LABEL_VALUE_RGUI_ASPECT_RATIO_LOCK_INTEGER, + MENU_ENUM_LABEL_VALUE_RGUI_ASPECT_RATIO_LOCK_NONE, + MENU_ENUM_LABEL_VALUE_RGUI_ASPECT_RATIO_LOCK_FIT_SCREEN, + MENU_ENUM_LABEL_VALUE_RGUI_ASPECT_RATIO_LOCK_INTEGER, + MENU_ENUM_LABEL_VALUE_RGUI_ASPECT_RATIO_LOCK_FILL_SCREEN, MENU_ENUM_LABEL_VALUE_RGUI_PARTICLE_EFFECT_NONE, MENU_ENUM_LABEL_VALUE_RGUI_PARTICLE_EFFECT_SNOW,