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:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user