Repository navigation
Conversation
- 每个句柄一条控制台长连接,第一次点击时连上,断了重连一次;关闭句柄时先抬起还按着的手指。 - 按多点触控协议 B 拼 event send(槽位、跟踪编号、坐标、压力、接触面积),坐标按共享画面的宽高换算到 0–32767,和 event mouse 的换算、默认压力一致。最多 10 根手指;已按下的再按下当移动。 - 接口版本 2,能力位加 MODAVD_CAP_TOUCH;按键、文字仍是 MODAVD_E_UNSUPPORTED。 - 控制台客户端拆成打开、发送、关闭三步,一次性命令照旧。 - 新增 test_input:假控制台核对每条命令、坐标换算、重连、关闭时抬起和认证。
- test_open_posix 自己定义 mx_console_command 顶替库里的;点击用到 console.c 的会话函数后,console.c 会被链接进来,两份定义冲突(macOS 链接失败)。一次性命令单独成文件,顶替照旧有效。 - gcc 的 -Wformat-truncation 把 test_input 里按 %s 拷进固定缓冲判为可能截断,改成按长度拷贝。
Linux 上 PATH_MAX 是 4096,加固过的 glibc 对 1024 字节的缓冲区直接中止进程;macOS 的 PATH_MAX 正好是 1024,所以只在 Linux 上挂。
This was referenced Nov 13, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
这是什么
库加上宿主侧点击:
modavd_touch_down/modavd_touch_move/modavd_touch_up/modavd_touch_release_all从「已声明、返回不支持」变成能用,接口版本升到 2,能力位多了MODAVD_CAP_TOUCH。下一步给 MaaCore 加对应的触控模式。怎么做的
event send,发标准的多点触控事件(协议 B:槽位、跟踪编号、坐标、压力、接触面积)。模拟器把这类事件原样交给显示 0 的虚拟触屏(android_virtio_send_event_as_mt),安卓看到的是屏幕上的手指,和在模拟器窗口里点一样,客体里不用装东西。event mouse的换算一样;默认压力 0x400、接触面积 0x500 也照event mouse取。MODAVD_E_INVALID;抬起没按下的手指什么也不发。MODAVD_E_UNSUPPORTED:控制台event send发的按键会被送进触屏设备、被丢掉;event text会悄悄丢掉键盘映射里没有的字。测试
/W4 /WX):test_core、新的test_input、test_shim都过。test_input起一个假控制台,核对每个动作发出的命令、坐标换算和截断、认证、会话断开后重连重发、关闭句柄时抬起手指。Linux、macOS 交给 CI。modavd_extras.dll点击、20 步滑动、双指按住再全部抬起。getevent里事件来自virtio_input_multi_touch_1,单指点击的字段和值与event mouse产生的逐个相同;Refs #1