Fix DInput mouse acquisition

Lionel Ulmer lionel.ulmer at free.fr
Sat Dec 21 11:20:18 CST 2002


I really wonder for how long DInput was broken... Anyway, I hope I did not
do anything wrong by using GetModuleHandle(NULL) to get the handle of the
DInput DLL.

Now the mouse works again in the demo for Populous The Beginning (but the
graphics are completely borken when that happens).

Changelog:
 Fix mouse acquisition in DInput.

-- 
		 Lionel Ulmer - http://www.bbrox.org/
-------------- next part --------------
--- ../wine_base/dlls/dinput/mouse/main.c	Tue Jul 23 20:39:11 2002
+++ dlls/dinput/mouse/main.c	Sat Dec 21 18:14:59 2002
@@ -527,7 +527,7 @@
     /* Install our mouse hook */
     if (This->dwCoopLevel & DISCL_EXCLUSIVE)
       ShowCursor(FALSE); /* hide cursor */
-    This->hook = SetWindowsHookExW( WH_MOUSE_LL, dinput_mouse_hook, 0, 0 );
+    This->hook = SetWindowsHookExA( WH_MOUSE_LL, dinput_mouse_hook, GetModuleHandleA(NULL), 0 );
 
     /* Get the window dimension and find the center */
     GetWindowRect(This->win, &rect);


More information about the wine-patches mailing list