1
0
mirror of https://github.com/ppy/osu.git synced 2025-01-13 22:22:55 +08:00

Change sorting to better handle portrait screens

This commit is contained in:
Dean Herbert 2020-12-22 17:36:56 +09:00
parent 3d5783a0ea
commit 4f02928601

View File

@ -1,6 +1,7 @@
// Copyright (c) ppy Pty Ltd <contact@ppy.sh>. Licensed under the MIT Licence.
// See the LICENCE file in the repository root for full licence text.
using System;
using System.Drawing;
using System.Linq;
using osu.Framework.Allocation;
@ -150,8 +151,7 @@ namespace osu.Game.Overlays.Settings.Sections.Graphics
{
resolutions.AddRange(display.NewValue.DisplayModes
.Where(m => m.Size.Width >= 800 && m.Size.Height >= 600)
.OrderByDescending(m => m.Size.Width)
.ThenByDescending(m => m.Size.Height)
.OrderByDescending(m => Math.Max(m.Size.Height, m.Size.Width))
.Select(m => m.Size)
.Distinct());
}