Skip to content

Commit 483846f

Browse files
committed
Release v4.7: raw mouse SetCursorPos warp for dual-monitor focus
1 parent c960a62 commit 483846f

5 files changed

Lines changed: 11 additions & 17 deletions

File tree

CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,9 @@
11
# Changelog
22

3+
## v4.7
4+
5+
- Raw mouse: SetCursorPos hook now always calls the original so the OS cursor is warped when the game recenters, fixing dual-monitor focus loss (e.g. left edge on Wine/Kubuntu).
6+
37
## v4.6
48

59
- Raw mouse: message-pump–based flow. Replaced engine-frame hooks (IN_MouseMove, IN_MenuMouse, PeekMessageA, GetMessageA) with Sys_SendKeyEvents replacement and dedicated capped two-range pump so WM_INPUT is never peeked or delivered. One GetRawInputBuffer per frame in Sys_SendKeyEvents path; DispatchMessageA only handles window events (registration/clip). Virtual cursor via GetCursorPos/SetCursorPos. WOW64: buffer size×8 and RAWMOUSE at offset 24. Single cvar 0=off, non-zero=on. README updated.

VERSION

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
4.6
1+
4.7

compile_commands.json

Lines changed: 4 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -255,24 +255,14 @@
255255
"file": "/home/dinda/git-projects/d3nd3/public/sof/sof_buddy/src/features/raw_mouse/hooks/getcursorpos.cpp"
256256
},
257257
{
258-
"command": "i686-w64-mingw32-g++-posix -c -Ihdr -Isrc -Ibuild/release -MMD -MP -o obj/release/features/raw_mouse/hooks/getmessagea.o src/features/raw_mouse/hooks/getmessagea.cpp -D_WIN32_WINNT=0x0501 -std=c++14 -O3 -fno-omit-frame-pointer -DNDEBUG",
259-
"directory": "/home/dinda/git-projects/d3nd3/public/sof/sof_buddy",
260-
"file": "/home/dinda/git-projects/d3nd3/public/sof/sof_buddy/src/features/raw_mouse/hooks/getmessagea.cpp"
261-
},
262-
{
263-
"command": "i686-w64-mingw32-g++-posix -c -Ihdr -Isrc -Ibuild/release -MMD -MP -o obj/release/features/raw_mouse/hooks/in_menumouse.o src/features/raw_mouse/hooks/in_menumouse.cpp -D_WIN32_WINNT=0x0501 -std=c++14 -O3 -fno-omit-frame-pointer -DNDEBUG",
264-
"directory": "/home/dinda/git-projects/d3nd3/public/sof/sof_buddy",
265-
"file": "/home/dinda/git-projects/d3nd3/public/sof/sof_buddy/src/features/raw_mouse/hooks/in_menumouse.cpp"
266-
},
267-
{
268-
"command": "i686-w64-mingw32-g++-posix -c -Ihdr -Isrc -Ibuild/release -MMD -MP -o obj/release/features/raw_mouse/hooks/in_mousemove.o src/features/raw_mouse/hooks/in_mousemove.cpp -D_WIN32_WINNT=0x0501 -std=c++14 -O3 -fno-omit-frame-pointer -DNDEBUG",
258+
"command": "i686-w64-mingw32-g++-posix -c -Ihdr -Isrc -Ibuild/release -MMD -MP -o obj/release/features/raw_mouse/hooks/setcursorpos.o src/features/raw_mouse/hooks/setcursorpos.cpp -D_WIN32_WINNT=0x0501 -std=c++14 -O3 -fno-omit-frame-pointer -DNDEBUG",
269259
"directory": "/home/dinda/git-projects/d3nd3/public/sof/sof_buddy",
270-
"file": "/home/dinda/git-projects/d3nd3/public/sof/sof_buddy/src/features/raw_mouse/hooks/in_mousemove.cpp"
260+
"file": "/home/dinda/git-projects/d3nd3/public/sof/sof_buddy/src/features/raw_mouse/hooks/setcursorpos.cpp"
271261
},
272262
{
273-
"command": "i686-w64-mingw32-g++-posix -c -Ihdr -Isrc -Ibuild/release -MMD -MP -o obj/release/features/raw_mouse/hooks/setcursorpos.o src/features/raw_mouse/hooks/setcursorpos.cpp -D_WIN32_WINNT=0x0501 -std=c++14 -O3 -fno-omit-frame-pointer -DNDEBUG",
263+
"command": "i686-w64-mingw32-g++-posix -c -Ihdr -Isrc -Ibuild/release -MMD -MP -o obj/release/features/raw_mouse/hooks/sys_sendkeyevents.o src/features/raw_mouse/hooks/sys_sendkeyevents.cpp -D_WIN32_WINNT=0x0501 -std=c++14 -O3 -fno-omit-frame-pointer -DNDEBUG",
274264
"directory": "/home/dinda/git-projects/d3nd3/public/sof/sof_buddy",
275-
"file": "/home/dinda/git-projects/d3nd3/public/sof/sof_buddy/src/features/raw_mouse/hooks/setcursorpos.cpp"
265+
"file": "/home/dinda/git-projects/d3nd3/public/sof/sof_buddy/src/features/raw_mouse/hooks/sys_sendkeyevents.cpp"
276266
},
277267
{
278268
"command": "i686-w64-mingw32-g++-posix -c -Ihdr -Isrc -Ibuild/release -MMD -MP -o obj/release/features/raw_mouse/raw_cvars.o src/features/raw_mouse/raw_cvars.cpp -D_WIN32_WINNT=0x0501 -std=c++14 -O3 -fno-omit-frame-pointer -DNDEBUG",

hdr/version.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,4 +7,4 @@
77
Increment version using: ./increment_version.sh
88
*/
99

10-
#define SOFBUDDY_VERSION "4.6"
10+
#define SOFBUDDY_VERSION "4.7"

src/features/raw_mouse/hooks/setcursorpos.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ BOOL __stdcall hkSetCursorPos(int X, int Y) {
1616
}
1717

1818
raw_mouse_update_center(X, Y);
19-
return TRUE;
19+
return oSetCursorPos(X, Y);
2020
}
2121

2222
#endif // FEATURE_RAW_MOUSE

0 commit comments

Comments
 (0)