Set default window mode to "Borderless" rather than "Fullscreen" on macOS

This commit is contained in:
Salman Ahmed 2022-06-03 09:37:17 +03:00
parent c8f64d24eb
commit 6cb8b2d6f4
1 changed files with 7 additions and 3 deletions

View File

@ -9,6 +9,7 @@
using System.Threading.Tasks;
using Humanizer;
using JetBrains.Annotations;
using osu.Framework;
using osu.Framework.Allocation;
using osu.Framework.Audio;
using osu.Framework.Bindables;
@ -658,11 +659,14 @@ protected override void Dispose(bool isDisposing)
}
protected override IDictionary<FrameworkSetting, object> GetFrameworkConfigDefaults()
=> new Dictionary<FrameworkSetting, object>
{
return new Dictionary<FrameworkSetting, object>
{
// General expectation that osu! starts in fullscreen by default (also gives the most predictable performance)
{ FrameworkSetting.WindowMode, WindowMode.Fullscreen }
// General expectation that osu! starts in fullscreen by default (also gives the most predictable performance).
// However, macOS is bound to have issues when using exclusive fullscreen as it takes full control away from OS, therefore borderless is default there.
{ FrameworkSetting.WindowMode, RuntimeInfo.IsApple ? WindowMode.Borderless : WindowMode.Fullscreen }
};
}
protected override void LoadComplete()
{