mirror of
https://github.com/MaaAssistantArknights/MaaAssistantArknights.git
synced 2026-07-18 10:10:45 +08:00
@@ -2439,6 +2439,11 @@ 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>
|
||||
@@ -2506,6 +2511,30 @@ 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>
|
||||
@@ -2572,7 +2601,7 @@ namespace MaaWpfGui.ViewModels.UI
|
||||
rvm.WindowTitle = $"{prefix}MAA ({CurrentConfiguration}) - {VersionId}{poolString} - {connectConfigName} ({ConnectAddress}) - {ClientName}";
|
||||
}
|
||||
|
||||
private readonly string _bluestacksConfig = ConfigurationHelper.GetValue(ConfigurationKeys.BluestacksConfigPath, string.Empty);
|
||||
private readonly string _bluestacksConfig = GetBluestacksConfig();
|
||||
private string _bluestacksKeyWord = ConfigurationHelper.GetValue(ConfigurationKeys.BluestacksConfigKeyword, string.Empty);
|
||||
|
||||
/// <summary>
|
||||
|
||||
Reference in New Issue
Block a user