ImGuiFullscreen: Don't clamp scale to 1.0

This commit is contained in:
Stenzek 2024-01-31 00:16:06 +10:00
parent e9a21c4514
commit ebaef81aae
No known key found for this signature in database
1 changed files with 2 additions and 2 deletions

View File

@ -419,14 +419,14 @@ bool ImGuiFullscreen::UpdateLayoutScale()
if (screen_ratio > LAYOUT_RATIO)
{
// screen is wider, use height, pad width
g_layout_scale = std::max(screen_height / LAYOUT_SCREEN_HEIGHT, 1.0f);
g_layout_scale = std::max(screen_height / LAYOUT_SCREEN_HEIGHT, 0.1f);
g_layout_padding_top = 0.0f;
g_layout_padding_left = (screen_width - (LAYOUT_SCREEN_WIDTH * g_layout_scale)) / 2.0f;
}
else
{
// screen is taller, use width, pad height
g_layout_scale = std::max(screen_width / LAYOUT_SCREEN_WIDTH, 1.0f);
g_layout_scale = std::max(screen_width / LAYOUT_SCREEN_WIDTH, 0.1f);
g_layout_padding_top = (screen_height - (LAYOUT_SCREEN_HEIGHT * g_layout_scale)) / 2.0f;
g_layout_padding_left = 0.0f;
}