diff --git a/osu.Android.props b/osu.Android.props
index d418dcaccf..5b26b8f36e 100644
--- a/osu.Android.props
+++ b/osu.Android.props
@@ -52,7 +52,7 @@
-
+
diff --git a/osu.Game/Localisation/GraphicsSettingsStrings.cs b/osu.Game/Localisation/GraphicsSettingsStrings.cs
index 996a1350eb..1c9aa64df5 100644
--- a/osu.Game/Localisation/GraphicsSettingsStrings.cs
+++ b/osu.Game/Localisation/GraphicsSettingsStrings.cs
@@ -54,6 +54,11 @@ namespace osu.Game.Localisation
///
public static LocalisableString Resolution => new TranslatableString(getKey(@"resolution"), @"Resolution");
+ ///
+ /// "Display"
+ ///
+ public static LocalisableString Display => new TranslatableString(getKey(@"display"), @"Display");
+
///
/// "UI scaling"
///
diff --git a/osu.Game/Overlays/Settings/Sections/Graphics/LayoutSettings.cs b/osu.Game/Overlays/Settings/Sections/Graphics/LayoutSettings.cs
index adf1453d1a..602ace6dea 100644
--- a/osu.Game/Overlays/Settings/Sections/Graphics/LayoutSettings.cs
+++ b/osu.Game/Overlays/Settings/Sections/Graphics/LayoutSettings.cs
@@ -27,7 +27,7 @@ namespace osu.Game.Overlays.Settings.Sections.Graphics
private FillFlowContainer> scalingSettings;
- private readonly IBindable currentDisplay = new Bindable();
+ private readonly Bindable currentDisplay = new Bindable();
private readonly IBindableList windowModes = new BindableList();
private Bindable scalingMode;
@@ -39,6 +39,7 @@ namespace osu.Game.Overlays.Settings.Sections.Graphics
private OsuGameBase game { get; set; }
private SettingsDropdown resolutionDropdown;
+ private SettingsDropdown displayDropdown;
private SettingsDropdown windowModeDropdown;
private Bindable scalingPositionX;
@@ -72,6 +73,12 @@ namespace osu.Game.Overlays.Settings.Sections.Graphics
ItemSource = windowModes,
Current = config.GetBindable(FrameworkSetting.WindowMode),
},
+ displayDropdown = new DisplaySettingsDropdown
+ {
+ LabelText = GraphicsSettingsStrings.Display,
+ Items = host.Window?.Displays,
+ Current = currentDisplay,
+ },
resolutionDropdown = new ResolutionSettingsDropdown
{
LabelText = GraphicsSettingsStrings.Resolution,
@@ -142,7 +149,7 @@ namespace osu.Game.Overlays.Settings.Sections.Graphics
windowModeDropdown.Current.BindValueChanged(mode =>
{
- updateResolutionDropdown();
+ updateDisplayModeDropdowns();
windowModeDropdown.WarningText = mode.NewValue != WindowMode.Fullscreen ? GraphicsSettingsStrings.NotFullscreenNote : default;
}, true);
@@ -168,7 +175,7 @@ namespace osu.Game.Overlays.Settings.Sections.Graphics
.Distinct());
}
- updateResolutionDropdown();
+ updateDisplayModeDropdowns();
}), true);
scalingMode.BindValueChanged(mode =>
@@ -183,12 +190,17 @@ namespace osu.Game.Overlays.Settings.Sections.Graphics
// initial update bypasses transforms
updateScalingModeVisibility();
- void updateResolutionDropdown()
+ void updateDisplayModeDropdowns()
{
if (resolutions.Count > 1 && windowModeDropdown.Current.Value == WindowMode.Fullscreen)
resolutionDropdown.Show();
else
resolutionDropdown.Hide();
+
+ if (displayDropdown.Items.Count() > 1)
+ displayDropdown.Show();
+ else
+ displayDropdown.Hide();
}
void updateScalingModeVisibility()
@@ -243,6 +255,19 @@ namespace osu.Game.Overlays.Settings.Sections.Graphics
public override LocalisableString TooltipText => base.TooltipText + "x";
}
+ private class DisplaySettingsDropdown : SettingsDropdown
+ {
+ protected override OsuDropdown CreateDropdown() => new DisplaySettingsDropdownControl();
+
+ private class DisplaySettingsDropdownControl : DropdownControl
+ {
+ protected override LocalisableString GenerateItemText(Display item)
+ {
+ return $"{item.Index}: {item.Name} ({item.Bounds.Width}x{item.Bounds.Height})";
+ }
+ }
+ }
+
private class ResolutionSettingsDropdown : SettingsDropdown
{
protected override OsuDropdown CreateDropdown() => new ResolutionDropdownControl();
diff --git a/osu.Game/osu.Game.csproj b/osu.Game/osu.Game.csproj
index 64785ab566..d86fbc693e 100644
--- a/osu.Game/osu.Game.csproj
+++ b/osu.Game/osu.Game.csproj
@@ -36,7 +36,7 @@
runtime; build; native; contentfiles; analyzers; buildtransitive
-
+
diff --git a/osu.iOS.props b/osu.iOS.props
index a7bffd28b5..c37692f0d8 100644
--- a/osu.iOS.props
+++ b/osu.iOS.props
@@ -61,7 +61,7 @@
-
+
@@ -84,7 +84,7 @@
-
+