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

View File

@ -9,6 +9,7 @@ using System.Threading;
using System.Threading.Tasks; using System.Threading.Tasks;
using Humanizer; using Humanizer;
using JetBrains.Annotations; using JetBrains.Annotations;
using osu.Framework;
using osu.Framework.Allocation; using osu.Framework.Allocation;
using osu.Framework.Audio; using osu.Framework.Audio;
using osu.Framework.Bindables; using osu.Framework.Bindables;
@ -658,11 +659,14 @@ namespace osu.Game
} }
protected override IDictionary<FrameworkSetting, object> GetFrameworkConfigDefaults() 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) // General expectation that osu! starts in fullscreen by default (also gives the most predictable performance).
{ FrameworkSetting.WindowMode, WindowMode.Fullscreen } // 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() protected override void LoadComplete()
{ {