[dinput] Drop magic int
Christoph Frick
frick at sc-networks.de
Wed Dec 20 05:28:58 CST 2006
Yet I have my doubts about the check in the next line against 0x00FF - this
would be DIDFT_MAKEINSTANCE(255) which is actually used for the keyboard
---
dlls/dinput/device.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/dlls/dinput/device.c b/dlls/dinput/device.c
index 6b05ed6..31e05a5 100644
--- a/dlls/dinput/device.c
+++ b/dlls/dinput/device.c
@@ -381,7 +381,7 @@ HRESULT create_DataFormat(LPCDIDATAFORMAT asked_format, DataFormat *format)
(/* Then check if it accepts any instance id, and if not, if it matches Wine's
* instance id.
*/
- (DIDFT_GETINSTANCE(asked_format->rgodf[j].dwType) == 0xFFFF) ||
+ ((asked_format->rgodf[j].dwType & DIDFT_INSTANCEMASK) == DIDFT_ANYINSTANCE) ||
(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(format->wine_df->rgodf[i].dwType)))
&&
--
1.4.4.2
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 163 bytes
Desc: not available
Url : http://www.winehq.org/pipermail/wine-patches/attachments/20061220/67684064/attachment.pgp
More information about the wine-patches
mailing list