DINPUT: enforce single mouse acquire (try 2)

Alex Villací­s Lasso a_villacis at palosanto.com
Fri Jan 27 10:25:52 CST 2006


While testing the trial of Fate/Stay Night (www.typemoon.org), I found a 
way to crash dinput: start the trial (mouse acquire, function hook), 
display the About dialog (nested mouse acquire, second instance of 
function hook, overwrites first acquire pointer... oops!), dismiss About 
dialog (current_lock <= NULL, second hook unregistered, first hook 
remains, mouse event called with current_lock == NULL ==> segmentation 
fault). This patch attempts to fix this by disallowing nested mouse 
acquires.

Changelog:
* Disallow nested mouse acquires
* Add assertion that mouse hook called should have current_lock != NULL

Alex Villacís Lasso
-------------- next part --------------
A non-text attachment was scrubbed...
Name: wine-dinput-acquire_lock_try2.patch
Type: text/x-patch
Size: 871 bytes
Desc: not available
Url : http://www.winehq.org/pipermail/wine-patches/attachments/20060127/b6604196/wine-dinput-acquire_lock_try2.patch


More information about the wine-patches mailing list