Add warning note when running fullscreen on macOS

This commit is contained in:
Salman Ahmed 2022-06-03 10:23:38 +03:00
parent 6cb8b2d6f4
commit 1a835f0622
2 changed files with 12 additions and 0 deletions

View File

@ -24,6 +24,11 @@ public static class LayoutSettingsStrings
/// </summary>
public static LocalisableString UnableToRunExclusiveFullscreen => new TranslatableString(getKey(@"unable_to_run_exclusive_fullscreen"), @"Unable to run exclusive fullscreen. You'll still experience some input latency.");
/// <summary>
/// "Running fullscreen on macOS takes full control away from the system, this could lead to system-wide freezes if the game becomes unresponsive."
/// </summary>
public static LocalisableString FullscreenMacOSNote => new TranslatableString(getKey(@"fullscreen_macos_note"), @"Running fullscreen on macOS takes full control away from the system, this could lead to system-wide freezes if the game becomes unresponsive.");
private static string getKey(string key) => $@"{prefix}:{key}";
}
}

View File

@ -4,6 +4,7 @@
using System;
using System.Drawing;
using System.Linq;
using osu.Framework;
using osu.Framework.Allocation;
using osu.Framework.Bindables;
using osu.Framework.Configuration;
@ -230,6 +231,12 @@ private void updateScreenModeWarning()
return;
}
if (RuntimeInfo.OS == RuntimeInfo.Platform.macOS)
{
windowModeDropdown.SetNoticeText(LayoutSettingsStrings.FullscreenMacOSNote, true);
return;
}
if (host.Window is WindowsWindow)
{
switch (fullscreenCapability.Value)