From f9490912e5f179edaf73bb15a694bfe83cae3dbf Mon Sep 17 00:00:00 2001 From: MistEO Date: Thu, 3 Aug 2023 10:38:52 +0800 Subject: [PATCH] =?UTF-8?q?Revert=20"feat:=E8=87=AA=E5=8A=A8=E6=A3=80?= =?UTF-8?q?=E6=B5=8B=E7=89=B9=E5=AE=9A=E7=9B=AE=E5=BD=95=E4=B8=8B=E7=9A=84?= =?UTF-8?q?bluestacks.conf"?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../ViewModels/UI/SettingsViewModel.cs | 31 +------------------ 1 file changed, 1 insertion(+), 30 deletions(-) diff --git a/src/MaaWpfGui/ViewModels/UI/SettingsViewModel.cs b/src/MaaWpfGui/ViewModels/UI/SettingsViewModel.cs index 1259f122e2..123b28c013 100644 --- a/src/MaaWpfGui/ViewModels/UI/SettingsViewModel.cs +++ b/src/MaaWpfGui/ViewModels/UI/SettingsViewModel.cs @@ -2439,11 +2439,6 @@ namespace MaaWpfGui.ViewModels.UI { "WSA", new List { "127.0.0.1:58526" } }, }; - /// - /// Gets the default bluestack conf. - /// - public static List DafaultBluestacksConfPath { get; } = new List { "C:\\ProgramData\\BlueStacks_nxt\\bluestacks.conf", "D:\\BlueStacks_nxt\\bluestacks.conf" }; - /// /// Refreshes ADB config. /// @@ -2511,30 +2506,6 @@ namespace MaaWpfGui.ViewModels.UI return true; } - - /// - /// Get the path of bluestacks.conf - /// - /// path - public static string GetBluestacksConfig() - { - var conf = ConfigurationHelper.GetValue(ConfigurationKeys.BluestacksConfigPath, string.Empty); - if (!string.IsNullOrEmpty(conf)) - { - return conf; - } - - foreach (var confPath in DafaultBluestacksConfPath) - { - if (File.Exists(confPath)) - { - return confPath; - } - } - - return null; - } - /// /// Selects ADB program file. /// @@ -2601,7 +2572,7 @@ namespace MaaWpfGui.ViewModels.UI rvm.WindowTitle = $"{prefix}MAA ({CurrentConfiguration}) - {VersionId}{poolString} - {connectConfigName} ({ConnectAddress}) - {ClientName}"; } - private readonly string _bluestacksConfig = GetBluestacksConfig(); + private readonly string _bluestacksConfig = ConfigurationHelper.GetValue(ConfigurationKeys.BluestacksConfigPath, string.Empty); private string _bluestacksKeyWord = ConfigurationHelper.GetValue(ConfigurationKeys.BluestacksConfigKeyword, string.Empty); ///