diff options
author | sr55 <[email protected]> | 2021-02-28 12:09:42 +0000 |
---|---|---|
committer | sr55 <[email protected]> | 2021-02-28 12:10:15 +0000 |
commit | adbd01221818bc206b72509b85ab5076463d4158 (patch) | |
tree | d9ebf263d103fb4f628c6549eec2cec1a9f11380 /win/CS/HandBrakeWPF | |
parent | 8d3d803511cf3aa941e87d206ff165616b571bda (diff) |
WinGui: Add a warning in preferencs -> Safemode when Hardware support is not available.
Diffstat (limited to 'win/CS/HandBrakeWPF')
-rw-r--r-- | win/CS/HandBrakeWPF/Properties/Resources.Designer.cs | 13 | ||||
-rw-r--r-- | win/CS/HandBrakeWPF/Properties/Resources.resx | 7 | ||||
-rw-r--r-- | win/CS/HandBrakeWPF/ViewModels/OptionsViewModel.cs | 4 | ||||
-rw-r--r-- | win/CS/HandBrakeWPF/Views/OptionsView.xaml | 16 |
4 files changed, 34 insertions, 6 deletions
diff --git a/win/CS/HandBrakeWPF/Properties/Resources.Designer.cs b/win/CS/HandBrakeWPF/Properties/Resources.Designer.cs index 922b9f129..0b9f31970 100644 --- a/win/CS/HandBrakeWPF/Properties/Resources.Designer.cs +++ b/win/CS/HandBrakeWPF/Properties/Resources.Designer.cs @@ -3617,7 +3617,7 @@ namespace HandBrakeWPF.Properties { } /// <summary> - /// Looks up a localized string similar to Run each queued job in a separate worker process. (Experimental). + /// Looks up a localized string similar to Run each queued job in a separate worker process.. /// </summary> public static string OptionsView_EnableWorkerProcesses { get { @@ -3654,7 +3654,7 @@ namespace HandBrakeWPF.Properties { } /// <summary> - /// Looks up a localized string similar to Hardware encoding support is currently disabled. Please make sure you are running up-to-date drivers for all graphics adaptors in this system. + /// Looks up a localized string similar to Hardware encoding support is currently disabled. If you did not start HandBrake with the "--no-hardware" option, please make sure you are running up-to-date drivers for all graphics adaptors in this system. /// ///This will not impact any of the software encoders.. /// </summary> @@ -3809,6 +3809,15 @@ namespace HandBrakeWPF.Properties { } /// <summary> + /// Looks up a localized string similar to Warning: Please note that this is a "Safe Mode" build of HandBrake that does not include support for hardware encoders. If you wish to use hardware encoder support, please download a non-"Safe Mode" build from the website.. + /// </summary> + public static string OptionsView_SafeMode { + get { + return ResourceManager.GetString("OptionsView_SafeMode", resourceCulture); + } + } + + /// <summary> /// Looks up a localized string similar to Please select a folder.. /// </summary> public static string OptionsView_SelectFolder { diff --git a/win/CS/HandBrakeWPF/Properties/Resources.resx b/win/CS/HandBrakeWPF/Properties/Resources.resx index f0ee417b4..2bc277e9a 100644 --- a/win/CS/HandBrakeWPF/Properties/Resources.resx +++ b/win/CS/HandBrakeWPF/Properties/Resources.resx @@ -1843,7 +1843,7 @@ VLC and MPC-HC are supported. Other players may also work but are not validated. <value>Show 'Add Selection to Queue' on the toolbar</value>
</data>
<data name="OptionsView_HardwareDetectFailed" xml:space="preserve">
- <value>Hardware encoding support is currently disabled. Please make sure you are running up-to-date drivers for all graphics adaptors in this system.
+ <value>Hardware encoding support is currently disabled. If you did not start HandBrake with the "--no-hardware" option, please make sure you are running up-to-date drivers for all graphics adaptors in this system.
This will not impact any of the software encoders.</value>
</data>
@@ -2191,7 +2191,7 @@ This will also stop any existing running jobs.</value> <value>Please select a single job to view summary information.</value>
</data>
<data name="OptionsView_EnableWorkerProcesses" xml:space="preserve">
- <value>Run each queued job in a separate worker process. (Experimental)</value>
+ <value>Run each queued job in a separate worker process.</value>
</data>
<data name="OptionsView_WorkerDefaultPort" xml:space="preserve">
<value>Default network port for worker:</value>
@@ -2457,4 +2457,7 @@ Fields are limited to: <data name="Startup_HbDllMissing" xml:space="preserve">
<value>Missing file "hb.dll". Please re-install.</value>
</data>
+ <data name="OptionsView_SafeMode" xml:space="preserve">
+ <value>Warning: Please note that this is a "Safe Mode" build of HandBrake that does not include support for hardware encoders. If you wish to use hardware encoder support, please download a non-"Safe Mode" build from the website.</value>
+ </data>
</root>
\ No newline at end of file diff --git a/win/CS/HandBrakeWPF/ViewModels/OptionsViewModel.cs b/win/CS/HandBrakeWPF/ViewModels/OptionsViewModel.cs index 2eb5ce954..817fb4041 100644 --- a/win/CS/HandBrakeWPF/ViewModels/OptionsViewModel.cs +++ b/win/CS/HandBrakeWPF/ViewModels/OptionsViewModel.cs @@ -881,6 +881,10 @@ namespace HandBrakeWPF.ViewModels public bool IsHardwareFallbackMode => HandBrakeUtils.IsInitNoHardware();
+ public bool IsSafeMode => HandBrakeHardwareEncoderHelper.IsSafeMode;
+
+ public bool IsHardwareOptionsVisibile => !IsSafeMode && !IsHardwareFallbackMode;
+
/* About HandBrake */
diff --git a/win/CS/HandBrakeWPF/Views/OptionsView.xaml b/win/CS/HandBrakeWPF/Views/OptionsView.xaml index dc7a7ab46..1709d0160 100644 --- a/win/CS/HandBrakeWPF/Views/OptionsView.xaml +++ b/win/CS/HandBrakeWPF/Views/OptionsView.xaml @@ -338,7 +338,19 @@ <TextBlock Text="{x:Static Properties:Resources.Options_Video}" FontSize="20" FontFamily="Segoe UI Light" />
- <Grid Visibility="{Binding IsHardwareFallbackMode, Converter={StaticResource boolToVisConverter}}" Margin="10,5,0,0" Grid.Row="1">
+
+ <Grid Visibility="{Binding IsSafeMode, Converter={StaticResource boolToVisConverter}}" Margin="10,5,10,0">
+ <Grid.ColumnDefinitions>
+ <ColumnDefinition Width="Auto" />
+ <ColumnDefinition Width="*" />
+ </Grid.ColumnDefinitions>
+
+ <Image Source="Images/warningsmall.png" Width="16" Height="16" VerticalAlignment="Center" Margin="0,0,10,0" Grid.Column="0" />
+ <TextBlock Text="{x:Static Properties:Resources.OptionsView_SafeMode}" TextWrapping="Wrap" Grid.Column="1" FontSize="14" />
+ </Grid>
+
+
+ <Grid Visibility="{Binding IsHardwareFallbackMode, Converter={StaticResource boolToVisConverter}}" Margin="10,5,0,0">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="Auto" />
<ColumnDefinition Width="*" />
@@ -348,7 +360,7 @@ <TextBlock Text="{x:Static Properties:Resources.OptionsView_HardwareDetectFailed}" TextWrapping="Wrap" Grid.Column="1" />
</Grid>
- <StackPanel Orientation="Vertical" Margin="0,0,0,20">
+ <StackPanel Orientation="Vertical" Margin="0,0,0,20" Visibility="{Binding IsHardwareOptionsVisibile, Converter={StaticResource boolToVisConverter}}">
<TextBlock Text="{x:Static Properties:Resources.Options_Encoding}" FontSize="14" Margin="0,10,0,10" />
<StackPanel Orientation="Vertical" Margin="20,0,0,0">
|