From fa8d7a0fe60bd31fd60016a34a82fa1c84582734 Mon Sep 17 00:00:00 2001 From: Lionel Ulmer Date: Thu, 5 May 2005 09:49:54 +0000 Subject: [PATCH] - more pretty print for the types flag - more Windows-aligned check for object instances --- dlls/dinput/device.c | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/dlls/dinput/device.c b/dlls/dinput/device.c index 46a1fb53b9b..78b9f0a0aa5 100644 --- a/dlls/dinput/device.c +++ b/dlls/dinput/device.c @@ -80,7 +80,10 @@ void _dump_EnumObjects_flags(DWORD dwFlags) { 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 @@ DataFormat *create_DataFormat(const DIDATAFORMAT *wine_format, LPCDIDATAFORMAT a (/* 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;