Skip to content

Commit

Permalink
Fixed bug #675
Browse files Browse the repository at this point in the history
  Description From  maf6@cornell.edu   2009-01-10 14:07:52   (-) [reply]

Assuming the SDL project doesn't just want to pick these up from dinput8.lib or
whatever instead, the definitions in SDL_dx5video.c should be:

const DIDATAFORMAT c_dfDIKeyboard = { sizeof(DIDATAFORMAT),
sizeof(DIOBJECTDATAFORMAT), 0x00000002, 256, 256, KBD_fmt };
const DIDATAFORMAT c_dfDIMouse = { sizeof(DIDATAFORMAT),
sizeof(DIOBJECTDATAFORMAT), 0x00000002, 16, 7, PTR_fmt };
const DIDATAFORMAT c_dfDIJoystick = { sizeof(DIDATAFORMAT),
sizeof(DIOBJECTDATAFORMAT), 0x00000001, 80, 44, JOY_fmt };

This way the call to IDirectInputDevice2_SetDataFormat in SDL_dx5events.c will
succeed on x64.
  • Loading branch information
slouken committed Apr 13, 2009
1 parent 4b02eea commit 78ccd1d
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/video/windx5/SDL_dx5video.c
Expand Up @@ -332,7 +332,7 @@ static DIOBJECTDATAFORMAT KBD_fmt[] = {
{ &GUID_Key, 255, 0x8000FF0C, 0x00000000 },
};

const DIDATAFORMAT c_dfDIKeyboard = { 24, 16, 0x00000002, 256, 256, KBD_fmt };
const DIDATAFORMAT c_dfDIKeyboard = { sizeof(DIDATAFORMAT), sizeof(DIOBJECTDATAFORMAT), 0x00000002, 256, 256, KBD_fmt };


/* Mouse */
Expand All @@ -347,7 +347,7 @@ static DIOBJECTDATAFORMAT PTR_fmt[] = {
{ NULL, 15, 0x80FFFF0C, 0x00000000 },
};

const DIDATAFORMAT c_dfDIMouse = { 24, 16, 0x00000002, 16, 7, PTR_fmt };
const DIDATAFORMAT c_dfDIMouse = { sizeof(DIDATAFORMAT), sizeof(DIOBJECTDATAFORMAT), 0x00000002, 16, 7, PTR_fmt };


/* Joystick */
Expand Down Expand Up @@ -399,7 +399,7 @@ static DIOBJECTDATAFORMAT JOY_fmt[] = {
{ NULL, 79, 0x80FFFF0C, 0x00000000 },
};

const DIDATAFORMAT c_dfDIJoystick = { 24, 16, 0x00000001, 80, 44, JOY_fmt };
const DIDATAFORMAT c_dfDIJoystick = { sizeof(DIDATAFORMAT), sizeof(DIOBJECTDATAFORMAT), 0x00000001, 80, 44, JOY_fmt };


/* Initialization/Query functions */
Expand Down

0 comments on commit 78ccd1d

Please sign in to comment.