fix: skip features that the running Windows build does not support (#832)

This commit is contained in:
HetCreep
2026-10-18 22:23:18 +02:00
committed by GitHub
parent 94dd603da4
commit 73834839ff
13 changed files with 240 additions and 5 deletions
+2 -2
View File
@@ -418,7 +418,7 @@ function New-DynamicTweakControls {
if ($feature.Category -ne $categoryName) { $featureIndex++; continue }
# Check version and feature compatibility using Features.json
if (($feature.MinVersion -and $WinVersion -lt $feature.MinVersion) -or ($feature.MaxVersion -and $WinVersion -gt $feature.MaxVersion) -or ($feature.FeatureId -eq 'DisableModernStandbyNetworking' -and (-not $script:ModernStandbySupported))) {
if (-not (Test-FeatureSupportedOnBuild -Feature $feature -Build $WinVersion) -or ($feature.FeatureId -eq 'DisableModernStandbyNetworking' -and (-not $script:ModernStandbySupported))) {
$featureIndex++; continue
}
@@ -451,7 +451,7 @@ function New-DynamicTweakControls {
foreach ($fid in $_.FeatureIds) {
if ($featureMap.ContainsKey($fid)) {
$f = $featureMap[$fid]
if (($f.MinVersion -and $WinVersion -lt $f.MinVersion) -or ($f.MaxVersion -and $WinVersion -gt $f.MaxVersion)) {
if (-not (Test-FeatureSupportedOnBuild -Feature $f -Build $WinVersion)) {
$allCompatible = $false
break
}