mirror of
https://github.com/Pathoschild/SMAPI.git
synced 2026-10-12 02:08:51 +00:00
add friendly OS name for Windows 10/11 in log
This commit is contained in:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user