Scrcpy Mask v0.8.1
更新说明
v0.8.1 是一次较大的功能更新,重点改进了映射随机化、脚本系统、scrcpy 投屏性能、窗口控制和设备连接体验。
映射与触控
- 新增点击、滑动、方向轮盘和施法类映射的随机化能力,支持随机落点、曲线轨迹和多段路径。#100 #120
- 新增 DirectionPad 上方向 boost,可用于类似
W行走、W + Shift奔跑的配置。#120 - 新增 Observation 最大半径限制,用于限制移动视角映射本身的范围。#120
- 新建映射时自动分配 Pointer ID,并增加 Pointer ID 说明和指针调试开关,减少多键同时按下时的触点冲突。#119 #120
窗口与设备
- 新增可拖动标题栏、置顶按钮、标题栏显示/隐藏,以及窗口大小和位置持久化。#72 #110
- 改进窗口缩放和逻辑坐标处理,减少缩放后映射位置错位的问题。#72 #110
- 改进 Linux、Wayland 和部分显卡环境下透明窗口兼容性。#118 #114
- 新增无线 ADB 连接地址记忆功能,连接成功后下次会自动填回。
脚本系统
- 新增脚本 hooks,可在映射动作执行前后运行脚本;例如进入轮盘前退出 FPS 模式,结束后再恢复 FPS 模式。#120
- 新增脚本运行模式控制,支持通过脚本进入/退出 FPS 模式。
- 新增脚本运行状态存储,可在同一脚本映射的按下、按住、抬起或 hooks 之间保存状态。
- 改进脚本语言工具链,支持语法/语义校验、错误定位、上下文提示和编辑器内联反馈。
- 映射设置中显示配置 ID,方便在脚本中引用指定映射。
投屏性能
- 重做 scrcpy 投屏渲染路径,视频帧现在直接以 YUV 纹理上传到 GPU,并通过 shader 完成颜色转换。
- 优化视频帧投递流程,只保留最新帧,减少帧堆积带来的延迟。
- 投屏性能已明显提升,实际体验接近直接使用 scrcpy。
修复问题
- 修复调整蒙版大小时仍可能发出触摸事件的问题。
- 修复方向轮盘相反方向同时按下时可能错误抬起触点的问题。
- 修复滚动后映射菜单定位、脚本按钮遮挡、Web 静态资源缓存等问题。
- 修复设备连接后窗口未激活/未聚焦的问题。
- 恢复 Apache-2.0 LICENSE 文件。
Update Notes
v0.8.1 is a major feature update focused on mapping randomization, the scripting system, scrcpy screen mirroring performance, window controls, and device connection experience.
Mapping and Touch Control
- Added randomization for taps, swipes, DirectionPad, and cast mappings, including random offsets, curved trajectories, and multi-segment paths. #100 #120
- Added DirectionPad up-direction boost for setups such as
Wwalking andW + Shiftrunning. #120 - Added Observation max radius to limit the movement range of view-control mappings. #120
- New mappings now get Pointer IDs automatically, with clearer Pointer ID hints and pointer debugging controls. #119 #120
Window and Device
- Added a draggable titlebar, always-on-top control, titlebar visibility control, and window size/position persistence. #72 #110
- Improved window resizing and logical coordinate handling to reduce mapping offset issues. #72 #110
- Improved transparent window compatibility on Linux, Wayland, and some GPU environments. #118 #114
- Added wireless ADB address persistence.
Script System
- Added script hooks, allowing scripts to run before and after mapping actions; for example, exiting FPS mode before opening a wheel and restoring FPS mode afterwards. #120
- Added script runtime mode controls, including entering and exiting FPS mode from scripts.
- Added script state storage, so pressed, held, released scripts and hooks can share state within the same mapping.
- Improved the script language tooling with syntax/semantic validation, error locations, contextual hints, and inline editor feedback.
- Mapping config IDs are now shown in settings, making it easier to reference specific mappings from scripts.
Screen Mirroring Performance
- Reworked the scrcpy screen mirroring render path. Video frames are now uploaded as YUV textures and converted on the GPU with a shader.
- Optimized video frame delivery to keep only the latest frame and reduce latency caused by frame backlog.
- Screen mirroring performance is significantly improved and is now close to using scrcpy directly.
Bug Fixes
- Fixed touch events being emitted while resizing the mask window.
- Fixed DirectionPad touch-up behavior when opposite directions are pressed together.
- Fixed mapping menu positioning after scrolling, script button overlap, and web asset cache behavior.
- Fixed window activation/focus after device connection.
- Restored the Apache-2.0 LICENSE file.