mirror of
https://github.com/LmeSzinc/StarRailCopilot.git
synced 2024-11-26 02:11:06 +00:00
Opt: Use scrcpy screenshot and maatouch clicks
This commit is contained in:
parent
cec7d1886c
commit
f517481e5b
@ -3,7 +3,7 @@
|
|||||||
"Emulator": {
|
"Emulator": {
|
||||||
"Serial": "auto",
|
"Serial": "auto",
|
||||||
"PackageName": "auto",
|
"PackageName": "auto",
|
||||||
"ScreenshotMethod": "auto",
|
"ScreenshotMethod": "scrcpy",
|
||||||
"ControlMethod": "MaaTouch",
|
"ControlMethod": "MaaTouch",
|
||||||
"ScreenshotDedithering": false,
|
"ScreenshotDedithering": false,
|
||||||
"AdbRestart": false
|
"AdbRestart": false
|
||||||
|
@ -18,7 +18,7 @@
|
|||||||
},
|
},
|
||||||
"ScreenshotMethod": {
|
"ScreenshotMethod": {
|
||||||
"type": "select",
|
"type": "select",
|
||||||
"value": "auto",
|
"value": "scrcpy",
|
||||||
"option": [
|
"option": [
|
||||||
"auto",
|
"auto",
|
||||||
"ADB",
|
"ADB",
|
||||||
@ -29,7 +29,8 @@
|
|||||||
"DroidCast",
|
"DroidCast",
|
||||||
"DroidCast_raw",
|
"DroidCast_raw",
|
||||||
"scrcpy"
|
"scrcpy"
|
||||||
]
|
],
|
||||||
|
"display": "hide"
|
||||||
},
|
},
|
||||||
"ControlMethod": {
|
"ControlMethod": {
|
||||||
"type": "select",
|
"type": "select",
|
||||||
@ -37,7 +38,8 @@
|
|||||||
"option": [
|
"option": [
|
||||||
"minitouch",
|
"minitouch",
|
||||||
"MaaTouch"
|
"MaaTouch"
|
||||||
]
|
],
|
||||||
|
"display": "hide"
|
||||||
},
|
},
|
||||||
"ScreenshotDedithering": {
|
"ScreenshotDedithering": {
|
||||||
"type": "checkbox",
|
"type": "checkbox",
|
||||||
|
@ -5,6 +5,10 @@
|
|||||||
|
|
||||||
# ==================== Alas ====================
|
# ==================== Alas ====================
|
||||||
|
|
||||||
|
Alas:
|
||||||
|
Emulator:
|
||||||
|
ScreenshotMethod: scrcpy
|
||||||
|
ControlMethod: MaaTouch
|
||||||
Restart:
|
Restart:
|
||||||
Scheduler:
|
Scheduler:
|
||||||
Enable:
|
Enable:
|
||||||
|
@ -4,7 +4,7 @@ import module.device.method.scrcpy.const as const
|
|||||||
|
|
||||||
|
|
||||||
class ScrcpyOptions:
|
class ScrcpyOptions:
|
||||||
frame_rate = 6
|
frame_rate = 10
|
||||||
|
|
||||||
@classmethod
|
@classmethod
|
||||||
def codec_options(cls) -> str:
|
def codec_options(cls) -> str:
|
||||||
|
@ -238,9 +238,9 @@ class Screenshot(Adb, WSA, DroidCast, AScreenCap, Scrcpy):
|
|||||||
self._screen_black_checked = False
|
self._screen_black_checked = False
|
||||||
return False
|
return False
|
||||||
else:
|
else:
|
||||||
logger.warning(f'Received pure black screenshots from emulator, color: {color}')
|
# logger.warning(f'Received pure black screenshots from emulator, color: {color}')
|
||||||
logger.warning(f'Screenshot method `{self.config.Emulator_ScreenshotMethod}` '
|
# logger.warning(f'Screenshot method `{self.config.Emulator_ScreenshotMethod}` '
|
||||||
f'may not work on emulator `{self.serial}`, or the emulator is not fully started')
|
# f'may not work on emulator `{self.serial}`, or the emulator is not fully started')
|
||||||
if self.is_mumu_family:
|
if self.is_mumu_family:
|
||||||
if self.config.Emulator_ScreenshotMethod == 'DroidCast':
|
if self.config.Emulator_ScreenshotMethod == 'DroidCast':
|
||||||
self.droidcast_stop()
|
self.droidcast_stop()
|
||||||
|
Loading…
Reference in New Issue
Block a user