From fc40fde80e058f8d13f1a6e2c4e885131ba73e81 Mon Sep 17 00:00:00 2001 From: MistEO Date: Sun, 14 Aug 2022 02:17:32 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=E6=96=B0=E5=A2=9E=E6=94=AF=E6=8C=81?= =?UTF-8?q?=E5=AF=B9=E5=A4=9A=E5=BC=80=E8=93=9D=E5=8F=A0=20HyperV=20?= =?UTF-8?q?=E6=A8=A1=E6=8B=9F=E5=99=A8=E7=9A=84=E6=94=AF=E6=8C=81=EF=BC=88?= =?UTF-8?q?=E9=9C=80=E8=A6=81=E8=87=AA=E5=B7=B1=E4=BF=AE=E6=94=B9=E9=85=8D?= =?UTF-8?q?=E7=BD=AE=EF=BC=89?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit fix https://github.com/MaaAssistantArknights/MaaAssistantArknights/issues/1533 --- docs/模拟器支持.md | 8 ++++++++ src/MeoAsstGui/ViewModels/SettingsViewModel.cs | 3 ++- 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/docs/模拟器支持.md b/docs/模拟器支持.md index 19990eb908..7c2839c938 100644 --- a/docs/模拟器支持.md +++ b/docs/模拟器支持.md @@ -26,6 +26,14 @@ 4. 开启 MAA, LinkStart! +- 如果你还需要多开(不使用多开请忽略这步),可以再修改 MAA 检测配置文件的关键字。 + 参照上述步骤,添加 `Bluestacks.Config.Keyword` 字段 + 示例: + + ```jsonc + "Bluestacks.Config.Keyword":"bst.instance.Nougat64.status.adb_port", + ``` + ### ✅ 夜神模拟器 完美支持 diff --git a/src/MeoAsstGui/ViewModels/SettingsViewModel.cs b/src/MeoAsstGui/ViewModels/SettingsViewModel.cs index 0bb5877c96..af5f666703 100644 --- a/src/MeoAsstGui/ViewModels/SettingsViewModel.cs +++ b/src/MeoAsstGui/ViewModels/SettingsViewModel.cs @@ -1664,6 +1664,7 @@ namespace MeoAsstGui } private readonly string _bluestacksConfig = ViewStatusStorage.Get("Bluestacks.Config.Path", string.Empty); + private readonly string _bluestacksKeyWord = ViewStatusStorage.Get("Bluestacks.Config.Keyword", "bst.instance.Nougat64.status.adb_port"); /// /// Tries to set Bluestack Hyper V address. @@ -1684,7 +1685,7 @@ namespace MeoAsstGui var all_lines = File.ReadAllLines(_bluestacksConfig); foreach (var line in all_lines) { - if (line.StartsWith("bst.instance.Nougat64.status.adb_port")) + if (line.StartsWith(_bluestacksKeyWord)) { var sp = line.Split('"'); ConnectAddress = "127.0.0.1:" + sp[1];