mirror of
https://gitee.com/sui-feng-cb/AzurLaneAutoScript1
synced 2026-03-18 01:01:29 +08:00
Add support for Bluestacks 5 Pie64 instances
Fix #2188 by matching either Nougat64 or Pie64 at the same time. Note that this creates a problem such that when first Nougat64 and Pie64 co-exists, the engine would fail to match Pie64.
This commit is contained in:
@@ -179,9 +179,9 @@ class ConnectionAttr:
|
|||||||
logger.info("Reading Realtime adb port")
|
logger.info("Reading Realtime adb port")
|
||||||
|
|
||||||
if serial == "bluestacks5-hyperv":
|
if serial == "bluestacks5-hyperv":
|
||||||
parameter_name = r"bst\.instance\.Nougat64\.status\.adb_port"
|
parameter_name = r"bst\.instance\.(Nougat64|Pie64)\.status\.adb_port"
|
||||||
else:
|
else:
|
||||||
parameter_name = rf"bst\.instance\.Nougat64_{serial[19:]}\.status.adb_port"
|
parameter_name = rf"bst\.instance\.(Nougat64|Pie64)_{serial[19:]}\.status.adb_port"
|
||||||
|
|
||||||
try:
|
try:
|
||||||
with OpenKey(HKEY_LOCAL_MACHINE, r"SOFTWARE\BlueStacks_nxt") as key:
|
with OpenKey(HKEY_LOCAL_MACHINE, r"SOFTWARE\BlueStacks_nxt") as key:
|
||||||
@@ -203,7 +203,7 @@ class ConnectionAttr:
|
|||||||
if port is None:
|
if port is None:
|
||||||
logger.warning(f"Did not match the result: {serial}.")
|
logger.warning(f"Did not match the result: {serial}.")
|
||||||
raise RequestHumanTakeover
|
raise RequestHumanTakeover
|
||||||
port = port.group(1)
|
port = port.group(2)
|
||||||
logger.info(f"Match to dynamic port: {port}")
|
logger.info(f"Match to dynamic port: {port}")
|
||||||
return f"127.0.0.1:{port}"
|
return f"127.0.0.1:{port}"
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user