Commit 4e56801a authored by Rémi Bernon's avatar Rémi Bernon Committed by Alexandre Julliard

dinput: Rewrite and simplify user data format object matching.

parent 621af39c
......@@ -30,14 +30,6 @@
typedef struct
{
int size;
int offset_in;
int offset_out;
int value;
} DataTransform;
typedef struct
{
LPDIDATAFORMAT wine_df; /* wine internal data format */
} DataFormat;
......
......@@ -4475,26 +4475,21 @@ static void test_simple_joystick(void)
objdataformat[3].dwType = 0xff|DIDFT_ANYINSTANCE;
objdataformat[3].dwFlags = 0;
hr = IDirectInputDevice8_SetDataFormat( device, &dataformat );
todo_wine
ok( hr == DIERR_INVALIDPARAM, "SetDataFormat returned: %#x\n", hr );
objdataformat[1].dwType = DIDFT_AXIS|DIDFT_MAKEINSTANCE( 12 );
hr = IDirectInputDevice8_SetDataFormat( device, &dataformat );
todo_wine
ok( hr == DIERR_INVALIDPARAM, "SetDataFormat returned: %#x\n", hr );
objdataformat[1].dwType = DIDFT_AXIS|DIDFT_MAKEINSTANCE( 0xff );
hr = IDirectInputDevice8_SetDataFormat( device, &dataformat );
todo_wine
ok( hr == DIERR_INVALIDPARAM, "SetDataFormat returned: %#x\n", hr );
objdataformat[1].dwType = DIDFT_AXIS|DIDFT_MAKEINSTANCE( 1 );
hr = IDirectInputDevice8_SetDataFormat( device, &dataformat );
ok( hr == DI_OK, "SetDataFormat returned: %#x\n", hr );
objdataformat[1].pguid = &GUID_RzAxis;
hr = IDirectInputDevice8_SetDataFormat( device, &dataformat );
todo_wine
ok( hr == DIERR_INVALIDPARAM, "SetDataFormat returned: %#x\n", hr );
objdataformat[1].pguid = &GUID_Unknown;
hr = IDirectInputDevice8_SetDataFormat( device, &dataformat );
todo_wine
ok( hr == DIERR_INVALIDPARAM, "SetDataFormat returned: %#x\n", hr );
objdataformat[1].pguid = &GUID_YAxis;
hr = IDirectInputDevice8_SetDataFormat( device, &dataformat );
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment