mirror of
https://gitee.com/sui-feng-cb/AzurLaneAutoScript1
synced 2026-03-19 23:33:33 +08:00
Fix: Share screenshot_method_override across tasks
This commit is contained in:
@@ -44,6 +44,10 @@ class Screenshot(Adb, WSA, DroidCast, AScreenCap, Scrcpy, NemuIpc, LDOpenGL):
|
|||||||
'ldopengl': self.screenshot_ldopengl,
|
'ldopengl': self.screenshot_ldopengl,
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@cached_property
|
||||||
|
def screenshot_method_override(self) -> str:
|
||||||
|
return ''
|
||||||
|
|
||||||
def screenshot(self):
|
def screenshot(self):
|
||||||
"""
|
"""
|
||||||
Returns:
|
Returns:
|
||||||
@@ -53,10 +57,11 @@ class Screenshot(Adb, WSA, DroidCast, AScreenCap, Scrcpy, NemuIpc, LDOpenGL):
|
|||||||
self._screenshot_interval.reset()
|
self._screenshot_interval.reset()
|
||||||
|
|
||||||
for _ in range(2):
|
for _ in range(2):
|
||||||
method = self.screenshot_methods.get(
|
if self.screenshot_method_override:
|
||||||
self.config.Emulator_ScreenshotMethod,
|
method = self.screenshot_method_override
|
||||||
self.screenshot_adb
|
else:
|
||||||
)
|
method = self.config.Emulator_ScreenshotMethod
|
||||||
|
method = self.screenshot_methods.get(method, self.screenshot_adb)
|
||||||
self.image = method()
|
self.image = method()
|
||||||
|
|
||||||
if self.config.Emulator_ScreenshotDedithering:
|
if self.config.Emulator_ScreenshotDedithering:
|
||||||
|
|||||||
Reference in New Issue
Block a user