user32: Fix SPI_GETMOUSESPEED and SPI_SETMOUSESPEED

Vincent Pelletier plr.vincent at gmail.com
Mon Dec 22 14:44:47 CST 2008


When I sent the patch to implement SPI_GETMOUSESPEED, I mistook mouse 
acceleration (3rd field of SPI_GETMOUSE) for mouse speed. This causes mouse 
to be slowed down to a crawl in "Black & White 2".

Declare new registry key paths.
Declare new mouse_sensitivity variable (named after the registry key holding 
it).
Fix "GET_" to use a separate value from acceleration, whose default is 10, as 
advertised by MSDN[1].
Fix "SET_" code accordingly, and update it to use "get_" accessors instead 
of "save", since the value is now cached.
Update coding style to match surrounding code style.

Note: MSDN tells the value is an int, but its range is 1..20 . As there is no 
function "get_int_param", I chose to store it as a UINT. Please tell me if 
there is any problem with that.

[1]: http://msdn.microsoft.com/en-us/library/ms724947.aspx
-- 
Vincent Pelletier
-------------- next part --------------
A non-text attachment was scrubbed...
Name: fix_SPI_GETMOUSESPEED_and_SPI_SETMOUSESPEED.diff
Type: text/x-diff
Size: 2911 bytes
Desc: not available
Url : http://www.winehq.org/pipermail/wine-patches/attachments/20081222/064dfae0/attachment.diff 


More information about the wine-patches mailing list