mirror of
https://github.com/libretro/RetroArch
synced 2025-01-31 06:32:48 +00:00
Merge pull request #10613 from jdgleaver/rgui-fill-screen
(RGUI) Add option to always stretch menu to fill the screen
This commit is contained in:
commit
42c5bb970e
@ -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"
|
||||
|
@ -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;
|
||||
|
@ -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
|
||||
};
|
||||
|
||||
|
@ -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
|
||||
|
@ -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,
|
||||
|
Loading…
x
Reference in New Issue
Block a user