Skip to content

Commit 24ee667

Browse files
committed
fix: 修改 win32 鼠标输入方式为 PostMessageWithCursorPos
1 parent cf9cd10 commit 24ee667

5 files changed

Lines changed: 5 additions & 5 deletions

File tree

custom/app.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@ def _connect_win32(Toolkit):
8282
ctrl = Win32Controller(
8383
target.hwnd,
8484
MaaWin32ScreencapMethodEnum.FramePool,
85-
MaaWin32InputMethodEnum.PostMessage,
85+
MaaWin32InputMethodEnum.PostMessageWithCursorPos,
8686
MaaWin32InputMethodEnum.PostMessage,
8787
)
8888
ctrl.post_connection().wait()

custom/maa/run.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,7 @@ def main() -> int:
9898
ctrl = Win32Controller(
9999
target.hwnd,
100100
MaaWin32ScreencapMethodEnum.FramePool,
101-
MaaWin32InputMethodEnum.PostMessage,
101+
MaaWin32InputMethodEnum.PostMessageWithCursorPos,
102102
MaaWin32InputMethodEnum.PostMessage,
103103
)
104104
ctrl.post_connection().wait()

custom/main.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ def pick_win32_controller(): # type: ignore[no-untyped-def]
5454
return Win32Controller(
5555
hWnd=target.hwnd,
5656
screencap_method=MaaWin32ScreencapMethodEnum.FramePool,
57-
mouse_method=MaaWin32InputMethodEnum.PostMessage,
57+
mouse_method=MaaWin32InputMethodEnum.PostMessageWithCursorPos,
5858
keyboard_method=MaaWin32InputMethodEnum.PostMessage,
5959
)
6060

custom/measure/run.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ def _connect_win32(Toolkit):
5757
ctrl = Win32Controller(
5858
target.hwnd,
5959
MaaWin32ScreencapMethodEnum.FramePool,
60-
MaaWin32InputMethodEnum.PostMessage,
60+
MaaWin32InputMethodEnum.PostMessageWithCursorPos,
6161
MaaWin32InputMethodEnum.PostMessage,
6262
)
6363
ctrl.post_connection().wait()

interface.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
"window_regex": "明日方舟",
1616
"class_regex": "UnityWndClass",
1717
"screencap": "FramePool",
18-
"mouse": "PostMessage",
18+
"mouse": "PostMessageWithCursorPos",
1919
"keyboard": "PostMessage"
2020
},
2121
"display_short_side": 720

0 commit comments

Comments
 (0)