[Resent with fix] [DInput] 'Proper' fix for the Fallout problem
Lionel Ulmer
lionel.ulmer at free.fr
Wed May 4 15:43:01 CDT 2005
This time tested on more than one application to work :-)
Changelog:
- more pretty print for the types flag
- more Windows-aligned check for object instances
--
Lionel Ulmer - http://www.bbrox.org/
-------------- next part --------------
Index: dlls/dinput/device.c
===================================================================
RCS file: /home/wine/wine/dlls/dinput/device.c,v
retrieving revision 1.26
diff -u -r1.26 device.c
--- dlls/dinput/device.c 25 Apr 2005 10:48:38 -0000 1.26
+++ dlls/dinput/device.c 4 May 2005 20:41:19 -0000
@@ -80,7 +80,10 @@
FE(DIDFT_NODATA),
FE(DIDFT_FFACTUATOR),
FE(DIDFT_FFEFFECTTRIGGER),
- FE(DIDFT_OUTPUT)
+ FE(DIDFT_OUTPUT),
+ FE(DIDFT_VENDORDEFINED),
+ FE(DIDFT_ALIAS),
+ FE(DIDFT_OPTIONAL)
#undef FE
};
type = (dwFlags & 0xFF0000FF);
@@ -315,8 +318,12 @@
(/* Then check if it accepts any instance id, and if not, if it matches Wine's
* instance id.
*/
- ((asked_format->rgodf[j].dwType & 0x00FFFF00) == DIDFT_ANYINSTANCE) ||
- (wine_format->rgodf[i].dwType & asked_format->rgodf[j].dwType))) {
+ (DIDFT_GETINSTANCE(asked_format->rgodf[j].dwType) == 0xFFFF) ||
+ (DIDFT_GETINSTANCE(asked_format->rgodf[j].dwType) == 0x00FF) || /* This is mentionned in no DX docs, but it works fine - tested on WinXP */
+ (DIDFT_GETINSTANCE(asked_format->rgodf[j].dwType) == DIDFT_GETINSTANCE(wine_format->rgodf[i].dwType)))
+ &&
+ ( /* Then if the asked type matches the one Wine provides */
+ wine_format->rgodf[i].dwType & asked_format->rgodf[j].dwType)) {
done[j] = 1;
More information about the wine-patches
mailing list