summaryrefslogtreecommitdiffstats
path: root/win
diff options
context:
space:
mode:
authorsr55 <[email protected]>2020-12-13 14:48:48 +0000
committersr55 <[email protected]>2020-12-13 14:48:53 +0000
commit8a277860dbf47a62f5e690ccf17e7a47a5b556c2 (patch)
treea0154842a5ce7f766d3e55de2419959bd43bc008 /win
parent7db0c342d286e0d884c3d7c0fcef51254d9fcd4f (diff)
WinGui: Reset Process Isolation settings if the machine hardware changes and is no longer viable. #3269
Diffstat (limited to 'win')
-rw-r--r--win/CS/HandBrakeWPF/Services/UserSettingService.cs19
1 files changed, 13 insertions, 6 deletions
diff --git a/win/CS/HandBrakeWPF/Services/UserSettingService.cs b/win/CS/HandBrakeWPF/Services/UserSettingService.cs
index 59afc88ba..7e297a5fe 100644
--- a/win/CS/HandBrakeWPF/Services/UserSettingService.cs
+++ b/win/CS/HandBrakeWPF/Services/UserSettingService.cs
@@ -218,12 +218,7 @@ namespace HandBrakeWPF.Services
this.Save();
}
- // Legacy Settings forced Reset.
- this.userSettings[UserSettingConstants.ScalingMode] = VideoScaler.Lanczos;
- if (!SystemInfo.IsWindows10())
- {
- this.userSettings[UserSettingConstants.ProcessIsolationEnabled] = false;
- }
+ this.ResetUnsupportedSettings();
}
catch (Exception exc)
{
@@ -245,6 +240,18 @@ namespace HandBrakeWPF.Services
}
}
}
+
+ private void ResetUnsupportedSettings()
+ {
+ // Legacy Settings forced Reset.
+ this.userSettings[UserSettingConstants.ScalingMode] = VideoScaler.Lanczos;
+
+ if (!SystemInfo.IsWindows10() || SystemInfo.GetCpuCoreCount < 4)
+ {
+ this.userSettings[UserSettingConstants.ProcessIsolationEnabled] = false;
+ this.userSettings[UserSettingConstants.SimultaneousEncodes] = 1;
+ }
+ }
/// <summary>
/// Load Default Settings