Opt: Use scrcpy screenshot and maatouch clicks

This commit is contained in:
LmeSzinc 2023-06-16 21:43:11 +08:00
parent cec7d1886c
commit f517481e5b
5 changed files with 14 additions and 8 deletions

View File

@ -3,7 +3,7 @@
"Emulator": {
"Serial": "auto",
"PackageName": "auto",
"ScreenshotMethod": "auto",
"ScreenshotMethod": "scrcpy",
"ControlMethod": "MaaTouch",
"ScreenshotDedithering": false,
"AdbRestart": false

View File

@ -18,7 +18,7 @@
},
"ScreenshotMethod": {
"type": "select",
"value": "auto",
"value": "scrcpy",
"option": [
"auto",
"ADB",
@ -29,7 +29,8 @@
"DroidCast",
"DroidCast_raw",
"scrcpy"
]
],
"display": "hide"
},
"ControlMethod": {
"type": "select",
@ -37,7 +38,8 @@
"option": [
"minitouch",
"MaaTouch"
]
],
"display": "hide"
},
"ScreenshotDedithering": {
"type": "checkbox",

View File

@ -5,6 +5,10 @@
# ==================== Alas ====================
Alas:
Emulator:
ScreenshotMethod: scrcpy
ControlMethod: MaaTouch
Restart:
Scheduler:
Enable:

View File

@ -4,7 +4,7 @@ import module.device.method.scrcpy.const as const
class ScrcpyOptions:
frame_rate = 6
frame_rate = 10
@classmethod
def codec_options(cls) -> str:

View File

@ -238,9 +238,9 @@ class Screenshot(Adb, WSA, DroidCast, AScreenCap, Scrcpy):
self._screen_black_checked = False
return False
else:
logger.warning(f'Received pure black screenshots from emulator, color: {color}')
logger.warning(f'Screenshot method `{self.config.Emulator_ScreenshotMethod}` '
f'may not work on emulator `{self.serial}`, or the emulator is not fully started')
# logger.warning(f'Received pure black screenshots from emulator, color: {color}')
# logger.warning(f'Screenshot method `{self.config.Emulator_ScreenshotMethod}` '
# f'may not work on emulator `{self.serial}`, or the emulator is not fully started')
if self.is_mumu_family:
if self.config.Emulator_ScreenshotMethod == 'DroidCast':
self.droidcast_stop()