1
0
mirror of https://gitee.com/sui-feng-cb/AzurLaneAutoScript1 synced 2026-03-13 14:57:02 +08:00

Fix: Catch _scrcpy_stream_loop_thread died

This commit is contained in:
LmeSzinc
2022-12-29 18:57:04 +08:00
parent b3d8fd4f1a
commit 1d96582c1f
2 changed files with 14 additions and 14 deletions

View File

@@ -82,6 +82,8 @@ class Scrcpy(ScrcpyCore):
now = time.time()
while 1:
time.sleep(0.001)
if self._scrcpy_stream_loop_thread is None or not self._scrcpy_stream_loop_thread.is_alive():
raise ScrcpyError('_scrcpy_stream_loop_thread died')
if self._scrcpy_last_frame_time > now:
screenshot = self._scrcpy_last_frame.copy()
return screenshot