fix: 修复未能遵守 PI 规定的短边尺寸的问题#200
Merged
Merged
Conversation
cde2140 to
6df71d9
Compare
Contributor
There was a problem hiding this comment.
Hey - 我在这里给出了一些整体性的反馈:
- TypeScript 中的控制器配置类型为 Adb/Win32/PlayCover/Gamepad 添加了
display_short_side字段,但没有为 WlRoots 添加;而现在 Rust 中的ControllerConfig枚举已经包含了这个字段。建议更新WlRootsControllerConfig接口,以保持 TS 与 Rust 的配置同步。 - 当前默认的短边值
720是在connect_controller_impl中硬编码的;建议将其提取为具名常量,以避免“魔法数字”,也方便未来修改默认值。
给 AI Agents 的提示
Please address the comments from this code review:
## Overall Comments
- TypeScript 中的控制器配置类型为 Adb/Win32/PlayCover/Gamepad 添加了 `display_short_side` 字段,但没有为 WlRoots 添加;而现在 Rust 中的 `ControllerConfig` 枚举已经包含了这个字段。建议更新 `WlRootsControllerConfig` 接口,以保持 TS 与 Rust 的配置同步。
- 当前默认的短边值 `720` 是在 `connect_controller_impl` 中硬编码的;建议将其提取为具名常量,以避免“魔法数字”,也方便未来修改默认值。帮我变得更有用!请在每条评论上点 👍 或 👎,我会根据你的反馈改进后续评审。
Original comment in English
Hey - I've left some high level feedback:
- The TypeScript controller config types add
display_short_sidefor Adb/Win32/PlayCover/Gamepad but not for WlRoots, which now has this field in the RustControllerConfigenum; consider updating theWlRootsControllerConfiginterface to keep the TS and Rust configs in sync. - The default short-side value
720is now hardcoded inconnect_controller_impl; consider extracting it to a named constant to avoid magic numbers and make future changes to the default easier.
Prompt for AI Agents
Please address the comments from this code review:
## Overall Comments
- The TypeScript controller config types add `display_short_side` for Adb/Win32/PlayCover/Gamepad but not for WlRoots, which now has this field in the Rust `ControllerConfig` enum; consider updating the `WlRootsControllerConfig` interface to keep the TS and Rust configs in sync.
- The default short-side value `720` is now hardcoded in `connect_controller_impl`; consider extracting it to a named constant to avoid magic numbers and make future changes to the default 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.
概要
此 PR 是为了解决 #198
关联
Fix #198
Summary by Sourcery
通过所有连接路径传播控制器显示短边设置,并在建立控制器连接时应用该设置。
Bug Fixes:
display_short_side值来处理,而不是始终使用硬编码的短边值。Enhancements:
display_short_side字段,并将其贯通到前端和后端的配置结构中。Original summary in English
Summary by Sourcery
Propagate the controller display short side setting through all connection paths and apply it when establishing controller connections.
Bug Fixes:
Enhancements:
Bug 修复:
display_short_side配置,以修复短边尺寸行为不正确的问题。增强功能:
display_short_side字段。Original summary in English
Summary by Sourcery
通过所有连接路径传播控制器显示短边设置,并在建立控制器连接时应用该设置。
Bug Fixes:
display_short_side值来处理,而不是始终使用硬编码的短边值。Enhancements:
display_short_side字段,并将其贯通到前端和后端的配置结构中。Original summary in English
Summary by Sourcery
Propagate the controller display short side setting through all connection paths and apply it when establishing controller connections.
Bug Fixes:
Enhancements: