add friendly OS name for Windows 10/11 in log

This commit is contained in:
Jesse Plamondon-Willard
2026-01-04 20:41:07 -05:00
parent ea139a32aa
commit e0220478ed
2 changed files with 10 additions and 0 deletions
+1
View File
@@ -3,6 +3,7 @@
# Release notes
## Upcoming release
* For players:
* The SMAPI console/log now shows "Windows 10" or "Windows 11" in the log instead of its internal OS identifier.
* Fixed `player_add` and `list_items` console commands not including some newer juice items.
* Fixed farmhouse map edits sometimes removing the spouse room (thanks to SinZ!).
* Fixed installer error if Steam has an empty game path saved to the registry.
@@ -63,6 +63,15 @@ internal static class LowLevelEnvironmentUtility
case nameof(Platform.Mac):
name = $"macOS {name}";
break;
case nameof(Platform.Windows):
// version 10 + 11
if (Environment.OSVersion.Platform == PlatformID.Win32NT && Environment.OSVersion.Version is { Major: 10, Minor: 0 } version)
{
int mainVersion = version.Build switch { < 22000 => 10, _ => 11 };
name = $"Windows {mainVersion} ({name.Replace("Microsoft Windows NT ", "")})";
}
break;
}
return name;