Merged
Conversation
Contributor
There was a problem hiding this comment.
Hey - 我在这里给出了一些总体反馈:
InputUtils.h中的三个contact_to_mouse_*_info函数在 switch 逻辑上几乎完全一致;可以考虑通过参数化基础事件(按下/拖拽/抬起)或使用一个小型查找表来合并它们,以减少重复代码,并让未来的修改集中在一个地方。- 对于
contact out of range的错误日志,包含允许的接触范围(例如0-2)或控制器类型可能会更有帮助,这样可以更容易排查配置相关的问题。
给 AI 代理的提示词
Please address the comments from this code review:
## Overall Comments
- The three `contact_to_mouse_*_info` functions in `InputUtils.h` share almost identical switch logic; consider consolidating them by parameterizing the base event (down/drag/up) or using a small lookup table to reduce duplication and keep future changes in one place.
- For the `contact out of range` error logs, it may be helpful to include the allowed contact range (e.g., `0-2`) or the controller type to make debugging configuration issues easier.帮我变得更有用!请在每条评论上点 👍 或 👎,我会根据你的反馈来改进之后的代码审查。
Original comment in English
Hey - I've left some high level feedback:
- The three
contact_to_mouse_*_infofunctions inInputUtils.hshare almost identical switch logic; consider consolidating them by parameterizing the base event (down/drag/up) or using a small lookup table to reduce duplication and keep future changes in one place. - For the
contact out of rangeerror logs, it may be helpful to include the allowed contact range (e.g.,0-2) or the controller type to make debugging configuration issues easier.
Prompt for AI Agents
Please address the comments from this code review:
## Overall Comments
- The three `contact_to_mouse_*_info` functions in `InputUtils.h` share almost identical switch logic; consider consolidating them by parameterizing the base event (down/drag/up) or using a small lookup table to reduce duplication and keep future changes in one place.
- For the `contact out of range` error logs, it may be helpful to include the allowed contact range (e.g., `0-2`) or the controller type to make debugging configuration issues easier.Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.
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.
才发现5.0有contact都没注意 , 参照了win32的逻辑补上去
Summary by Sourcery
为 macOS 控制器添加通过接触 ID 区分鼠标按键的支持,并更新文档以说明 macOS 中接触与按键的映射关系。
New Features:
Enhancements:
Documentation:
Tests:
Original summary in English
Summary by Sourcery
Add macOS controller support for distinguishing mouse buttons via contact IDs and align documentation to describe macOS contact-to-button mapping.
New Features:
Enhancements:
Documentation:
Tests: