diff --git a/intl/msg_hash_chs.h b/intl/msg_hash_chs.h index c3099db16b..1afd1d4b4c 100644 --- a/intl/msg_hash_chs.h +++ b/intl/msg_hash_chs.h @@ -7574,6 +7574,10 @@ MSG_HASH( MENU_ENUM_LABEL_VALUE_RGUI_ASPECT_RATIO_3_2_CENTRE, "3:2 (居中)" ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_RGUI_ASPECT_RATIO_5_3_CENTRE, + "5:3 (居中)" + ) MSG_HASH( MENU_ENUM_LABEL_VALUE_RGUI_ASPECT_RATIO_LOCK_NONE, "关" diff --git a/intl/msg_hash_de.h b/intl/msg_hash_de.h index 47ca8dda97..ec13404211 100644 --- a/intl/msg_hash_de.h +++ b/intl/msg_hash_de.h @@ -7462,6 +7462,10 @@ MSG_HASH( MENU_ENUM_LABEL_VALUE_RGUI_ASPECT_RATIO_3_2_CENTRE, "3:2 (zentriert)" ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_RGUI_ASPECT_RATIO_5_3_CENTRE, + "5:3 (zentriert)" + ) MSG_HASH( MENU_ENUM_LABEL_VALUE_RGUI_ASPECT_RATIO_LOCK_NONE, "AUS" diff --git a/intl/msg_hash_es.h b/intl/msg_hash_es.h index 36640e7ba5..6f7cf7707b 100644 --- a/intl/msg_hash_es.h +++ b/intl/msg_hash_es.h @@ -7622,6 +7622,10 @@ MSG_HASH( MENU_ENUM_LABEL_VALUE_RGUI_ASPECT_RATIO_3_2_CENTRE, "3:2 (centrada)" ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_RGUI_ASPECT_RATIO_5_3_CENTRE, + "5:3 (centrada)" + ) MSG_HASH( MENU_ENUM_LABEL_VALUE_RGUI_ASPECT_RATIO_LOCK_NONE, "No" diff --git a/intl/msg_hash_fi.h b/intl/msg_hash_fi.h index b3dec70136..40eb9bf4cb 100644 --- a/intl/msg_hash_fi.h +++ b/intl/msg_hash_fi.h @@ -6754,6 +6754,10 @@ MSG_HASH( MENU_ENUM_LABEL_VALUE_RGUI_ASPECT_RATIO_3_2_CENTRE, "3:2 (keskitetty)" ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_RGUI_ASPECT_RATIO_5_3_CENTRE, + "5:3 (keskitetty)" + ) MSG_HASH( MENU_ENUM_LABEL_VALUE_RGUI_ASPECT_RATIO_LOCK_NONE, "POIS" diff --git a/intl/msg_hash_fr.h b/intl/msg_hash_fr.h index ea900a93f1..36a9cf0858 100644 --- a/intl/msg_hash_fr.h +++ b/intl/msg_hash_fr.h @@ -7638,6 +7638,10 @@ MSG_HASH( MENU_ENUM_LABEL_VALUE_RGUI_ASPECT_RATIO_3_2_CENTRE, "3:2 (Centré)" ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_RGUI_ASPECT_RATIO_5_3_CENTRE, + "5:3 (Centré)" + ) MSG_HASH( MENU_ENUM_LABEL_VALUE_RGUI_ASPECT_RATIO_LOCK_NONE, "Désactivé" diff --git a/intl/msg_hash_it.h b/intl/msg_hash_it.h index 3469e79cfe..3156d0e805 100644 --- a/intl/msg_hash_it.h +++ b/intl/msg_hash_it.h @@ -7558,6 +7558,10 @@ MSG_HASH( MENU_ENUM_LABEL_VALUE_RGUI_ASPECT_RATIO_3_2_CENTRE, "3:2 (Centrato)" ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_RGUI_ASPECT_RATIO_5_3_CENTRE, + "5:3 (Centrato)" + ) MSG_HASH( MENU_ENUM_LABEL_VALUE_RGUI_ASPECT_RATIO_LOCK_NONE, "Disattivato" diff --git a/intl/msg_hash_ko.h b/intl/msg_hash_ko.h index 8182ee4fa1..33270b43ca 100644 --- a/intl/msg_hash_ko.h +++ b/intl/msg_hash_ko.h @@ -7646,6 +7646,10 @@ MSG_HASH( MENU_ENUM_LABEL_VALUE_RGUI_ASPECT_RATIO_3_2_CENTRE, "3:2 (가운데 맞춤)" ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_RGUI_ASPECT_RATIO_5_3_CENTRE, + "5:3 (가운데 맞춤)" + ) MSG_HASH( MENU_ENUM_LABEL_VALUE_RGUI_ASPECT_RATIO_LOCK_NONE, "끄기" diff --git a/intl/msg_hash_pl.h b/intl/msg_hash_pl.h index 6ab9a8fe58..376f7c0aff 100644 --- a/intl/msg_hash_pl.h +++ b/intl/msg_hash_pl.h @@ -7674,6 +7674,10 @@ MSG_HASH( MENU_ENUM_LABEL_VALUE_RGUI_ASPECT_RATIO_3_2_CENTRE, "3:2 (wypośrodkowane)" ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_RGUI_ASPECT_RATIO_5_3_CENTRE, + "5:3 (wypośrodkowane)" + ) MSG_HASH( MENU_ENUM_LABEL_VALUE_RGUI_ASPECT_RATIO_LOCK_NONE, "WYŁĄCZONE" diff --git a/intl/msg_hash_pt_br.h b/intl/msg_hash_pt_br.h index 0d8e0c74f1..7ddfb046e1 100644 --- a/intl/msg_hash_pt_br.h +++ b/intl/msg_hash_pt_br.h @@ -7566,6 +7566,10 @@ MSG_HASH( MENU_ENUM_LABEL_VALUE_RGUI_ASPECT_RATIO_3_2_CENTRE, "3:2 (centralizado)" ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_RGUI_ASPECT_RATIO_5_3_CENTRE, + "5:3 (centralizado)" + ) MSG_HASH( MENU_ENUM_LABEL_VALUE_RGUI_ASPECT_RATIO_LOCK_NONE, "DESLIGADO" diff --git a/intl/msg_hash_ru.h b/intl/msg_hash_ru.h index 617eaf87b9..357135d367 100644 --- a/intl/msg_hash_ru.h +++ b/intl/msg_hash_ru.h @@ -7702,6 +7702,10 @@ MSG_HASH( MENU_ENUM_LABEL_VALUE_RGUI_ASPECT_RATIO_3_2_CENTRE, "3:2 (по центру)" ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_RGUI_ASPECT_RATIO_5_3_CENTRE, + "5:3 (по центру)" + ) MSG_HASH( MENU_ENUM_LABEL_VALUE_RGUI_ASPECT_RATIO_LOCK_NONE, "ВЫКЛ" diff --git a/intl/msg_hash_tr.h b/intl/msg_hash_tr.h index 66ea3f4325..cf6ac1c2d2 100644 --- a/intl/msg_hash_tr.h +++ b/intl/msg_hash_tr.h @@ -7678,6 +7678,10 @@ MSG_HASH( MENU_ENUM_LABEL_VALUE_RGUI_ASPECT_RATIO_3_2_CENTRE, "3:2 (Ortalanmış)" ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_RGUI_ASPECT_RATIO_5_3_CENTRE, + "5:3 (Ortalanmış)" + ) MSG_HASH( MENU_ENUM_LABEL_VALUE_RGUI_ASPECT_RATIO_LOCK_NONE, "KAPALI" diff --git a/intl/msg_hash_us.h b/intl/msg_hash_us.h index ba1a24a44a..e8b957234e 100644 --- a/intl/msg_hash_us.h +++ b/intl/msg_hash_us.h @@ -8274,6 +8274,14 @@ MSG_HASH( MENU_ENUM_LABEL_VALUE_RGUI_ASPECT_RATIO_3_2_CENTRE, "3:2 (Centered)" ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_RGUI_ASPECT_RATIO_5_3, + "5:3" + ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_RGUI_ASPECT_RATIO_5_3_CENTRE, + "5:3 (Centered)" + ) MSG_HASH( MENU_ENUM_LABEL_VALUE_RGUI_ASPECT_RATIO_LOCK_NONE, "OFF" diff --git a/menu/drivers/rgui.c b/menu/drivers/rgui.c index cf38fecc4d..6badc45d0c 100644 --- a/menu/drivers/rgui.c +++ b/menu/drivers/rgui.c @@ -2521,6 +2521,10 @@ static void load_custom_theme(rgui_t *rgui, rgui_theme_t *theme_colors, const ch case RGUI_ASPECT_RATIO_3_2_CENTRE: wallpaper_key = "rgui_wallpaper_3_2"; break; + case RGUI_ASPECT_RATIO_5_3: + case RGUI_ASPECT_RATIO_5_3_CENTRE: + wallpaper_key = "rgui_wallpaper_5_3"; + break; default: /* 4:3 */ wallpaper_key = "rgui_wallpaper"; @@ -5014,6 +5018,28 @@ static bool rgui_set_aspect_ratio(rgui_t *rgui, bool delay_update) ( 4.0f / 3.0f) * (float)rgui->frame_buf.height); } break; + case RGUI_ASPECT_RATIO_5_3: + if (rgui->frame_buf.height == 240) + rgui->frame_buf.width = 400; + else + rgui->frame_buf.width = RGUI_ROUND_FB_WIDTH( + (5.0f / 3.0f) * (float)rgui->frame_buf.height); + base_term_width = rgui->frame_buf.width; + break; + case RGUI_ASPECT_RATIO_5_3_CENTRE: + if (rgui->frame_buf.height == 240) + { + rgui->frame_buf.width = 400; + base_term_width = 320; + } + else + { + rgui->frame_buf.width = RGUI_ROUND_FB_WIDTH( + (5.0f / 3.0f) * (float)rgui->frame_buf.height); + base_term_width = RGUI_ROUND_FB_WIDTH( + ( 4.0f / 3.0f) * (float)rgui->frame_buf.height); + } + break; default: /* 4:3 */ if (rgui->frame_buf.height == 240) @@ -5086,6 +5112,20 @@ static bool rgui_set_aspect_ratio(rgui_t *rgui, bool delay_update) base_term_width = (base_term_width < RGUI_MIN_FB_WIDTH) ? RGUI_MIN_FB_WIDTH : base_term_width; break; + case RGUI_ASPECT_RATIO_5_3: + rgui->frame_buf.height = (unsigned)( + (5.0f / 3.0f) * (float)rgui->frame_buf.width); + base_term_width = rgui->frame_buf.width; + break; + case RGUI_ASPECT_RATIO_5_3_CENTRE: + rgui->frame_buf.height = (unsigned)( + (5.0f / 3.0f) * (float)rgui->frame_buf.width); + base_term_width = RGUI_ROUND_FB_WIDTH( + ( 4.0f / 3.0f) * (float)rgui->frame_buf.height); + base_term_width = (base_term_width < RGUI_MIN_FB_WIDTH) ? + RGUI_MIN_FB_WIDTH : base_term_width; + break; + default: /* 4:3 */ rgui->frame_buf.height = (unsigned)( @@ -6143,6 +6183,11 @@ static void rgui_frame(void *data, video_frame_info_t *video_info) case RGUI_ASPECT_RATIO_3_2_CENTRE: default_fb_width = 360; break; + case RGUI_ASPECT_RATIO_5_3: + case RGUI_ASPECT_RATIO_5_3_CENTRE: + default_fb_width = 400; + break; + default: /* 4:3 */ default_fb_width = 320; diff --git a/menu/menu_defines.h b/menu/menu_defines.h index 0f56e72355..801a5dc8dd 100644 --- a/menu/menu_defines.h +++ b/menu/menu_defines.h @@ -332,6 +332,9 @@ enum rgui_aspect_ratio RGUI_ASPECT_RATIO_16_10_CENTRE, RGUI_ASPECT_RATIO_3_2, RGUI_ASPECT_RATIO_3_2_CENTRE, + RGUI_ASPECT_RATIO_5_3, + RGUI_ASPECT_RATIO_5_3_CENTRE, + RGUI_ASPECT_RATIO_LAST }; diff --git a/menu/menu_setting.c b/menu/menu_setting.c index a6ebdeed59..59c99f0f65 100644 --- a/menu/menu_setting.c +++ b/menu/menu_setting.c @@ -3950,6 +3950,19 @@ static void setting_get_string_representation_uint_rgui_aspect_ratio( MENU_ENUM_LABEL_VALUE_RGUI_ASPECT_RATIO_3_2_CENTRE), len); break; + case RGUI_ASPECT_RATIO_5_3: + strlcpy(s, + msg_hash_to_str( + MENU_ENUM_LABEL_VALUE_RGUI_ASPECT_RATIO_5_3), + len); + break; + case RGUI_ASPECT_RATIO_5_3_CENTRE: + strlcpy(s, + msg_hash_to_str( + MENU_ENUM_LABEL_VALUE_RGUI_ASPECT_RATIO_5_3_CENTRE), + len); + break; + } } diff --git a/msg_hash.h b/msg_hash.h index c00f7b1270..793381e6ca 100644 --- a/msg_hash.h +++ b/msg_hash.h @@ -2659,6 +2659,9 @@ enum msg_hash_enums MENU_ENUM_LABEL_VALUE_RGUI_ASPECT_RATIO_16_10_CENTRE, MENU_ENUM_LABEL_VALUE_RGUI_ASPECT_RATIO_3_2, MENU_ENUM_LABEL_VALUE_RGUI_ASPECT_RATIO_3_2_CENTRE, + MENU_ENUM_LABEL_VALUE_RGUI_ASPECT_RATIO_5_3, + MENU_ENUM_LABEL_VALUE_RGUI_ASPECT_RATIO_5_3_CENTRE, + MENU_ENUM_LABEL_VALUE_RGUI_ASPECT_RATIO_LOCK_NONE, MENU_ENUM_LABEL_VALUE_RGUI_ASPECT_RATIO_LOCK_FIT_SCREEN,