Revert "feat:自动检测特定目录下的bluestacks.conf"

This commit is contained in:
MistEO
2023-08-03 10:38:52 +08:00
committed by GitHub
parent 0496db8046
commit f9490912e5

View File

@@ -2439,11 +2439,6 @@ namespace MaaWpfGui.ViewModels.UI
{ "WSA", new List<string> { "127.0.0.1:58526" } },
};
/// <summary>
/// Gets the default bluestack conf.
/// </summary>
public static List<string> DafaultBluestacksConfPath { get; } = new List<string> { "C:\\ProgramData\\BlueStacks_nxt\\bluestacks.conf", "D:\\BlueStacks_nxt\\bluestacks.conf" };
/// <summary>
/// Refreshes ADB config.
/// </summary>
@@ -2511,30 +2506,6 @@ namespace MaaWpfGui.ViewModels.UI
return true;
}
/// <summary>
/// Get the path of bluestacks.conf
/// </summary>
/// <returns>path</returns>
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;
}
/// <summary>
/// Selects ADB program file.
/// </summary>
@@ -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);
/// <summary>