diff --git a/v2rayN/v2rayN/Mode/ConfigItems.cs b/v2rayN/v2rayN/Mode/ConfigItems.cs
index 198d3dd9..d9eea19e 100644
--- a/v2rayN/v2rayN/Mode/ConfigItems.cs
+++ b/v2rayN/v2rayN/Mode/ConfigItems.cs
@@ -103,6 +103,8 @@ namespace v2rayN.Mode
public bool enableSecurityProtocolTls13 { get; set; }
public int trayMenuServersLimit { get; set; } = 20;
+
+ public bool enableHWA { get; set; } = true;
}
[Serializable]
diff --git a/v2rayN/v2rayN/Resx/ResUI.Designer.cs b/v2rayN/v2rayN/Resx/ResUI.Designer.cs
index 3de5ca6e..f7237def 100644
--- a/v2rayN/v2rayN/Resx/ResUI.Designer.cs
+++ b/v2rayN/v2rayN/Resx/ResUI.Designer.cs
@@ -2509,6 +2509,15 @@ namespace v2rayN.Resx {
}
}
+ ///
+ /// 查找类似 Enable hardware acceleration(Require restart) 的本地化字符串。
+ ///
+ public static string TbSettingsEnableHWA {
+ get {
+ return ResourceManager.GetString("TbSettingsEnableHWA", resourceCulture);
+ }
+ }
+
///
/// 查找类似 Exception 的本地化字符串。
///
diff --git a/v2rayN/v2rayN/Resx/ResUI.fa-Ir.resx b/v2rayN/v2rayN/Resx/ResUI.fa-Ir.resx
index 1ca1676a..bc198929 100644
--- a/v2rayN/v2rayN/Resx/ResUI.fa-Ir.resx
+++ b/v2rayN/v2rayN/Resx/ResUI.fa-Ir.resx
@@ -1066,4 +1066,7 @@
This parameter is valid only for tcp/http and ws
+
+ فعالسازی شتابدهنده سختافزاری (نیاز به راهاندازی مجدد)
+
\ No newline at end of file
diff --git a/v2rayN/v2rayN/Resx/ResUI.resx b/v2rayN/v2rayN/Resx/ResUI.resx
index fa7d6a43..f6fdf2f0 100644
--- a/v2rayN/v2rayN/Resx/ResUI.resx
+++ b/v2rayN/v2rayN/Resx/ResUI.resx
@@ -1141,4 +1141,7 @@
SpiderX
+
+ Enable hardware acceleration(Require restart)
+
\ No newline at end of file
diff --git a/v2rayN/v2rayN/Resx/ResUI.ru.resx b/v2rayN/v2rayN/Resx/ResUI.ru.resx
index 98182b9a..366ef232 100644
--- a/v2rayN/v2rayN/Resx/ResUI.ru.resx
+++ b/v2rayN/v2rayN/Resx/ResUI.ru.resx
@@ -1108,4 +1108,7 @@
Размер шрифта
+
+ Включить аппаратное ускорение (требуется перезагрузка)
+
\ No newline at end of file
diff --git a/v2rayN/v2rayN/Resx/ResUI.zh-Hans.resx b/v2rayN/v2rayN/Resx/ResUI.zh-Hans.resx
index 67798f3e..1861a091 100644
--- a/v2rayN/v2rayN/Resx/ResUI.zh-Hans.resx
+++ b/v2rayN/v2rayN/Resx/ResUI.zh-Hans.resx
@@ -1141,4 +1141,7 @@
SpiderX
+
+ 启用硬件加速(需重启)
+
\ No newline at end of file
diff --git a/v2rayN/v2rayN/ViewModels/OptionSettingViewModel.cs b/v2rayN/v2rayN/ViewModels/OptionSettingViewModel.cs
index 87db80d4..b36c8bfb 100644
--- a/v2rayN/v2rayN/ViewModels/OptionSettingViewModel.cs
+++ b/v2rayN/v2rayN/ViewModels/OptionSettingViewModel.cs
@@ -65,6 +65,7 @@ namespace v2rayN.ViewModels
[Reactive] public string currentFontFamily { get; set; }
[Reactive] public int SpeedTestTimeout { get; set; }
[Reactive] public string SpeedTestUrl { get; set; }
+ [Reactive] public bool EnableHWA { get; set; }
#endregion
@@ -160,6 +161,7 @@ namespace v2rayN.ViewModels
currentFontFamily = _config.uiItem.currentFontFamily;
SpeedTestTimeout = _config.speedTestItem.speedTestTimeout;
SpeedTestUrl = _config.speedTestItem.speedTestUrl;
+ EnableHWA = _config.guiItem.enableHWA;
#endregion
@@ -339,6 +341,7 @@ namespace v2rayN.ViewModels
_config.uiItem.currentFontFamily = currentFontFamily;
_config.speedTestItem.speedTestTimeout = SpeedTestTimeout;
_config.speedTestItem.speedTestUrl = SpeedTestUrl;
+ _config.guiItem.enableHWA = EnableHWA;
//systemProxy
_config.systemProxyExceptions = systemProxyExceptions;
diff --git a/v2rayN/v2rayN/Views/MainWindow.xaml.cs b/v2rayN/v2rayN/Views/MainWindow.xaml.cs
index 3cc634e7..4483b65a 100644
--- a/v2rayN/v2rayN/Views/MainWindow.xaml.cs
+++ b/v2rayN/v2rayN/Views/MainWindow.xaml.cs
@@ -197,6 +197,11 @@ namespace v2rayN.Views
{
WindowState = WindowState.Minimized;
}
+
+ if (!_config.guiItem.enableHWA)
+ {
+ RenderOptions.ProcessRenderMode = RenderMode.SoftwareOnly;
+ }
}
#region Event
diff --git a/v2rayN/v2rayN/Views/OptionSettingWindow.xaml b/v2rayN/v2rayN/Views/OptionSettingWindow.xaml
index a83cf491..8bd03808 100644
--- a/v2rayN/v2rayN/Views/OptionSettingWindow.xaml
+++ b/v2rayN/v2rayN/Views/OptionSettingWindow.xaml
@@ -481,6 +481,7 @@
+
@@ -752,6 +753,20 @@
Width="300"
Margin="{StaticResource SettingItemMargin}"
Style="{StaticResource DefComboBox}" />
+
+
+
diff --git a/v2rayN/v2rayN/Views/OptionSettingWindow.xaml.cs b/v2rayN/v2rayN/Views/OptionSettingWindow.xaml.cs
index bd5b241c..2cd8c05a 100644
--- a/v2rayN/v2rayN/Views/OptionSettingWindow.xaml.cs
+++ b/v2rayN/v2rayN/Views/OptionSettingWindow.xaml.cs
@@ -164,6 +164,7 @@ namespace v2rayN.Views
this.Bind(ViewModel, vm => vm.currentFontFamily, v => v.cmbcurrentFontFamily.Text).DisposeWith(disposables);
this.Bind(ViewModel, vm => vm.SpeedTestTimeout, v => v.cmbSpeedTestTimeout.Text).DisposeWith(disposables);
this.Bind(ViewModel, vm => vm.SpeedTestUrl, v => v.cmbSpeedTestUrl.Text).DisposeWith(disposables);
+ this.Bind(ViewModel, vm => vm.EnableHWA, v => v.togEnableHWA.IsChecked).DisposeWith(disposables);
this.Bind(ViewModel, vm => vm.systemProxyAdvancedProtocol, v => v.cmbsystemProxyAdvancedProtocol.Text).DisposeWith(disposables);