diff options
author | Jesse Plamondon-Willard <github@jplamondonw.com> | 2018-04-13 23:54:44 -0400 |
---|---|---|
committer | Jesse Plamondon-Willard <github@jplamondonw.com> | 2018-04-13 23:54:44 -0400 |
commit | 0d5278a270a0d51baefe99cf908f532a66489602 (patch) | |
tree | 970ca05bc0c7997b4f7845161d53469318e6ccec | |
parent | 45f4f85b7e74e0cffd345310d6aabc95c12dac26 (diff) | |
download | SMAPI-0d5278a270a0d51baefe99cf908f532a66489602.tar.gz SMAPI-0d5278a270a0d51baefe99cf908f532a66489602.tar.bz2 SMAPI-0d5278a270a0d51baefe99cf908f532a66489602.zip |
use light-background color scheme on Mac by default
-rw-r--r-- | docs/release-notes.md | 2 | ||||
-rw-r--r-- | src/SMAPI/Framework/Monitor.cs | 8 |
2 files changed, 8 insertions, 2 deletions
diff --git a/docs/release-notes.md b/docs/release-notes.md index 40f404d3..9ae1d2c4 100644 --- a/docs/release-notes.md +++ b/docs/release-notes.md @@ -5,7 +5,7 @@ * Added support for Stardew Valley 1.3+; no longer compatible with earlier versions. * Added `Context.IsMultiplayer` and `Context.IsMainPlayer` flags. * Fixed SMAPI update checks not showing newer beta versions when using a beta version. - * Fixed console color scheme for PowerShell and added override option to `StardewModdingAPI.config.json`. + * Fixed console color scheme on Mac or PowerShell, and added override option to `StardewModdingAPI.config.json`. * For modders: * Added code analysis to mod build config package to flag common issues as warnings. diff --git a/src/SMAPI/Framework/Monitor.cs b/src/SMAPI/Framework/Monitor.cs index da025ab9..a76afc3c 100644 --- a/src/SMAPI/Framework/Monitor.cs +++ b/src/SMAPI/Framework/Monitor.cs @@ -2,6 +2,7 @@ using System; using System.Collections.Generic; using System.Linq; using System.Threading; +using StardewModdingAPI.Common; using StardewModdingAPI.Framework.Logging; using StardewModdingAPI.Framework.Models; @@ -153,7 +154,12 @@ namespace StardewModdingAPI.Framework { // auto detect color scheme if (colorScheme == MonitorColorScheme.AutoDetect) - colorScheme = Monitor.IsDark(Console.BackgroundColor) ? MonitorColorScheme.DarkBackground : MonitorColorScheme.LightBackground; + { + if (Constants.TargetPlatform == Platform.Mac) + colorScheme = MonitorColorScheme.LightBackground; // MacOS doesn't provide console background color info, but it's usually white. + else + colorScheme = Monitor.IsDark(Console.BackgroundColor) ? MonitorColorScheme.DarkBackground : MonitorColorScheme.LightBackground; + } // get colors for scheme switch (colorScheme) |