修复bug
This commit is contained in:
4
.idea/workspace.xml
generated
4
.idea/workspace.xml
generated
@@ -4,7 +4,9 @@
|
|||||||
<option name="autoReloadType" value="SELECTIVE" />
|
<option name="autoReloadType" value="SELECTIVE" />
|
||||||
</component>
|
</component>
|
||||||
<component name="ChangeListManager">
|
<component name="ChangeListManager">
|
||||||
<list default="true" id="eceeff5e-51c1-459c-a911-d21ec090a423" name="Changes" comment="20250904-初步功能已完成" />
|
<list default="true" id="eceeff5e-51c1-459c-a911-d21ec090a423" name="Changes" comment="20250904-初步功能已完成">
|
||||||
|
<change beforePath="$PROJECT_DIR$/Module/DeviceInfo.py" beforeDir="false" afterPath="$PROJECT_DIR$/Module/DeviceInfo.py" afterDir="false" />
|
||||||
|
</list>
|
||||||
<option name="SHOW_DIALOG" value="false" />
|
<option name="SHOW_DIALOG" value="false" />
|
||||||
<option name="HIGHLIGHT_CONFLICTS" value="true" />
|
<option name="HIGHLIGHT_CONFLICTS" value="true" />
|
||||||
<option name="HIGHLIGHT_NON_ACTIVE_CHANGELIST" value="false" />
|
<option name="HIGHLIGHT_NON_ACTIVE_CHANGELIST" value="false" />
|
||||||
|
|||||||
Binary file not shown.
@@ -78,15 +78,19 @@ class DeviceInfo:
|
|||||||
if w == 0 or h == 0 or s == 0:
|
if w == 0 or h == 0 or s == 0:
|
||||||
print("未获取到设备屏幕信息")
|
print("未获取到设备屏幕信息")
|
||||||
return
|
return
|
||||||
|
print("获取设备信息成功")
|
||||||
port = self._alloc_port()
|
port = self._alloc_port()
|
||||||
proc = self._start_iproxy(udid, port)
|
proc = self._start_iproxy(udid, port)
|
||||||
if not proc:
|
if not proc:
|
||||||
|
print("启动iproxy失败")
|
||||||
return
|
return
|
||||||
model = DeviceModel(deviceId=udid, screenPort=port,
|
model = DeviceModel(deviceId=udid, screenPort=port,
|
||||||
width=w, height=h, scale=s, type=1)
|
width=w, height=h, scale=s, type=1)
|
||||||
model.ready = True
|
model.ready = True
|
||||||
self._models[udid] = model
|
self._models[udid] = model
|
||||||
self._procs[udid] = proc
|
self._procs[udid] = proc
|
||||||
|
|
||||||
|
print("准备添加设备")
|
||||||
self._manager_send(model)
|
self._manager_send(model)
|
||||||
|
|
||||||
# ---------------- 移除设备 ----------------
|
# ---------------- 移除设备 ----------------
|
||||||
@@ -150,7 +154,7 @@ class DeviceInfo:
|
|||||||
flags = subprocess.CREATE_NO_WINDOW | subprocess.CREATE_NEW_PROCESS_GROUP
|
flags = subprocess.CREATE_NO_WINDOW | subprocess.CREATE_NEW_PROCESS_GROUP
|
||||||
|
|
||||||
return subprocess.Popen(
|
return subprocess.Popen(
|
||||||
[self._iproxy_path, "-u", udid, str(port), wdaScreenPort],
|
[self._iproxy_path, "-u", udid, str(port), str(wdaScreenPort)],
|
||||||
stdout=subprocess.DEVNULL,
|
stdout=subprocess.DEVNULL,
|
||||||
stderr=subprocess.DEVNULL,
|
stderr=subprocess.DEVNULL,
|
||||||
creationflags=flags
|
creationflags=flags
|
||||||
|
|||||||
Binary file not shown.
Reference in New Issue
Block a user