mirror of
https://github.com/ppy/osu
synced 2025-02-09 22:57:37 +00:00
Do not display resolutions lower than 800x600
This commit is contained in:
parent
101f18821a
commit
4af45b7518
@ -126,11 +126,14 @@ namespace osu.Game.Overlays.Settings.Sections.Graphics
|
|||||||
|
|
||||||
private List<KeyValuePair<string, int>> getResolutions()
|
private List<KeyValuePair<string, int>> getResolutions()
|
||||||
{
|
{
|
||||||
var availableDisplayResolutions = (game.Window as DesktopGameWindow)?.AvailableDisplayResolutions.OrderByDescending(r => r.Width).ThenByDescending(r => r.Height);
|
var availableDisplayResolutions = (game.Window as DesktopGameWindow)?.AvailableDisplayResolutions
|
||||||
|
.Where(r => r.Width >= 800 && r.Height >= 600)
|
||||||
|
.OrderByDescending(r => r.Width).ThenByDescending(r => r.Height);
|
||||||
|
|
||||||
if (availableDisplayResolutions == null)
|
if (availableDisplayResolutions == null)
|
||||||
return new List<KeyValuePair<string, int>>();
|
return new List<KeyValuePair<string, int>>();
|
||||||
var availableDisplayResolutionsStr = availableDisplayResolutions.Select(r => $"{r.Width}x{r.Height}").Distinct().ToList();
|
|
||||||
|
|
||||||
|
var availableDisplayResolutionsStr = availableDisplayResolutions.Select(r => $"{r.Width}x{r.Height}").Distinct();
|
||||||
return availableDisplayResolutionsStr.Select((t, i) => new KeyValuePair<string, int>(t, i)).ToList();
|
return availableDisplayResolutionsStr.Select((t, i) => new KeyValuePair<string, int>(t, i)).ToList();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user