http://bugs.winehq.org/show_bug.cgi?id=6971
--- Comment #206 from Daniel Scharrer dscharrer@gmail.com 2009-01-13 11:42:54 --- Created an attachment (id=18681) --> (http://bugs.winehq.org/attachment.cgi?id=18681) Hack to read raw mouse movement from /dev/input/mice
I know XInput 2.0 will make this all obsolete, but being impatient I created a hack that somewhat works with Star Wars: Knights of the Old Republic: - I'm guessing this is Linux specific and won't work on Mac and *BSD. - Obviously you need read access to /dev/input/mice, which at least on my distro you don't have by default. - Moving the mouse when right clicked works as expected even when leaving the window / hitting the edge of the screen. - However, at least with SW:KOTR, when releasing the right mouse button while the cursor is over the window (well, it's hidden) the game locks up until you left-click the window. When the mouse is not over the window while releasing the RMB everything works fine. Removing the read(...) from line 318 fixes this, but obviously makes the patch useless.
I'm guessing the input hook is the wrong place to read the mouse from, but at least it ensures the mouse movement is properly updated (minimize overflows) and prevents unnecessary read()'s like you would get when placing the read() directly into SysMouseAImpl_GetDeviceState().