Skip to content

fix(KWin): correct MaaKWinControllerCreate signature#1369

Merged
MistEO merged 1 commit into
mainfrom
fix/MaaKWinControllerCreate
Jun 16, 2026
Merged

fix(KWin): correct MaaKWinControllerCreate signature#1369
MistEO merged 1 commit into
mainfrom
fix/MaaKWinControllerCreate

Conversation

@Lemon-miaow

@Lemon-miaow Lemon-miaow commented Jun 16, 2026

Copy link
Copy Markdown
Member

MaaKWinControllerCreate 的头文件声明和实际定义参数对不上

头文件 include/MaaFramework/Instance/MaaController.h(3个参数):
MAA_FRAMEWORK_API MaaController* MaaKWinControllerCreate(const char* device_node, int screen_width, int screen_height);

定义 source/MaaFramework/API/MaaFramework.cpp(4个参数):
MaaController* MaaKWinControllerCreate(const char* device_node, int screen_width, int screen_height, MaaBool use_win32_vk_code)

两处定义(MaaFramework.cppMaaAgentServerNotImpl.cpp)都是4个参数 只有头文件是3个 下游按头文件链接会炸

Summary by Sourcery

通过在头文件中添加缺失的参数并记录其行为,使 MaaKWinControllerCreate 公共 API 声明与其实现保持一致。

New Features:

  • 记录 use_win32_vk_code 参数的用途,该参数用于控制 KWin 控制器中从 Win32 Virtual-Key 到 Linux evdev 键码的转换。

Bug Fixes:

  • 修复 MaaKWinControllerCreate 函数在公共头文件与源文件实现之间的函数签名不匹配问题,以防止下游用户在链接阶段出现问题。
Original summary in English

Summary by Sourcery

Align the MaaKWinControllerCreate public API declaration with its implementation by adding the missing parameter to the header and documenting its behavior.

New Features:

  • Document the use_win32_vk_code parameter controlling Win32 Virtual-Key to Linux evdev key code translation for KWin controllers.

Bug Fixes:

  • Fix the MaaKWinControllerCreate function signature mismatch between the public header and source implementations to prevent linkage issues for downstream users.

@sourcery-ai sourcery-ai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hey - 我已经审查了你的更改,看起来非常棒!


Sourcery 对开源项目是免费的——如果你觉得我们的审查有帮助,请考虑分享给更多人 ✨
帮我变得更有用!请在每条评论上点 👍 或 👎,我会根据你的反馈来改进后续的审查。
Original comment in English

Hey - I've reviewed your changes and they look great!


Sourcery is free for open source - if you like our reviews please consider sharing them ✨
Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.

@MistEO MistEO merged commit 3d27ff4 into main Jun 16, 2026
19 checks passed
@MistEO MistEO deleted the fix/MaaKWinControllerCreate branch June 16, 2026 17:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants