DINPUT device unacquire (mouse) fix

Hannu Valtonen Hannu.Valtonen at hut.fi
Wed Oct 29 06:16:59 CST 2003


License: LGPL

Here are a few more fixes for dinput unacquire handling. According to 
MSDN DirectInputDevice Unacquire is allowed even for devices which 
haven't been acquired yet. These patches use the current (messy) scheme 
of things.

Changelog:
- JoystickAImpl_Unacquire should return DI_NOEFFECT if the device is not
in an acquired state.

- Hannu Valtonen
Hannu.Valtonen at hut.fi

-------------- next part --------------
--- linux.c	2003-10-29 14:07:53.000000000 +0200
+++ wine/dlls/dinput/joystick/linux.c	2003-10-29 13:59:18.000000000 +0200
@@ -306,8 +306,10 @@
     if (This->joyfd!=-1) {
   	close(This->joyfd);
 	This->joyfd = -1;
+	return DI_OK;
     }
-    return DI_OK;
+    else 
+    	return DI_NOEFFECT;
 }
 
 #define map_axis(val) ((val+32768)*(This->lMax-This->lMin)/65536+This->lMin)
-------------- next part --------------
--- linuxinput.c	2003-10-29 14:05:06.000000000 +0200
+++ wine/dlls/dinput/joystick/linuxinput.c	2003-10-29 14:09:18.000000000 +0200
@@ -432,8 +432,10 @@
     if (This->joyfd!=-1) {
   	close(This->joyfd);
 	This->joyfd = -1;
+	return DI_OK;
     }
-    return DI_OK;
+    else 
+    	return DI_NOEFFECT;
 }
 
 /*


More information about the wine-patches mailing list