Skip to content

Commit

Permalink
不清除缓存,而是返回最近一张截图
Browse files Browse the repository at this point in the history
  • Loading branch information
NakanoSanku committed Jul 25, 2024
1 parent e20c4d4 commit 9c42e4d
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions minidevice/screencap/minicap.py
Original file line number Diff line number Diff line change
Expand Up @@ -163,11 +163,10 @@ def readImageStream(self):
cursor = length

def nextImage(self):
#TODO: 修复长时间自旋消耗大量资源的问题
while not self.__image_cache:
continue
image = self.__image_cache
self.__image_cache = None
return image
return self.__image_cache

def stop(self):
self.running = False
Expand Down

0 comments on commit 9c42e4d

Please sign in to comment.