diff --git a/v2rayN/v2rayN/Mode/ConfigItems.cs b/v2rayN/v2rayN/Mode/ConfigItems.cs
index 198d3dd95da..d9eea19e549 100644
--- a/v2rayN/v2rayN/Mode/ConfigItems.cs
+++ b/v2rayN/v2rayN/Mode/ConfigItems.cs
@@ -103,6 +103,8 @@ public class GUIItem
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 3de5ca6edc4..f7237def83b 100644
--- a/v2rayN/v2rayN/Resx/ResUI.Designer.cs
+++ b/v2rayN/v2rayN/Resx/ResUI.Designer.cs
@@ -2509,6 +2509,15 @@ public static string TbSettingsEnableDragDropSort {
}
}
+ ///
+ /// 查找类似 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 1ca1676af50..bc198929778 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 fa7d6a43a8b..f6fdf2f0141 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 98182b9af90..366ef232105 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 67798f3e9b0..1861a0912f7 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 87db80d4b64..b36c8bfb208 100644
--- a/v2rayN/v2rayN/ViewModels/OptionSettingViewModel.cs
+++ b/v2rayN/v2rayN/ViewModels/OptionSettingViewModel.cs
@@ -65,6 +65,7 @@ public class OptionSettingViewModel : ReactiveObject
[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 @@ public OptionSettingViewModel(Window view)
currentFontFamily = _config.uiItem.currentFontFamily;
SpeedTestTimeout = _config.speedTestItem.speedTestTimeout;
SpeedTestUrl = _config.speedTestItem.speedTestUrl;
+ EnableHWA = _config.guiItem.enableHWA;
#endregion
@@ -339,6 +341,7 @@ private void SaveSetting()
_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 3cc634e7ff4..4483b65aa7a 100644
--- a/v2rayN/v2rayN/Views/MainWindow.xaml.cs
+++ b/v2rayN/v2rayN/Views/MainWindow.xaml.cs
@@ -197,6 +197,11 @@ public MainWindow()
{
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 a83cf491753..8bd0380857b 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 bd5b241c94d..2cd8c05aadf 100644
--- a/v2rayN/v2rayN/Views/OptionSettingWindow.xaml.cs
+++ b/v2rayN/v2rayN/Views/OptionSettingWindow.xaml.cs
@@ -164,6 +164,7 @@ public OptionSettingWindow()
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);