| Summary: | c_dfDIMouse and friends defined incorrectly, fail on 64-bit Windows | ||
|---|---|---|---|
| Product: | SDL | Reporter: | maf6 |
| Component: | video | Assignee: | Ryan C. Gordon <icculus> |
| Status: | RESOLVED FIXED | QA Contact: | Sam Lantinga <slouken> |
| Severity: | normal | ||
| Priority: | P2 | ||
| Version: | 1.2.13 | ||
| Hardware: | x86 | ||
| OS: | Windows Vista | ||
Thanks, I'm a little confused. The bug is listed for SDL 1.3.0, but SDL_dx5video.c doesn't exist in 1.3. In SDL 1.2 in subversion there are no definitions for c_df* What's the actual problem you're fixing? Sorry for the lack of clarity. Let me try again. :-) I'm using the 1.2.13 sources, downloaded from http://www.libsdl.org/download-1.2.php. I've updated the bug's version field to that effect. What I'm trying to do is use SDL for Windows x64 in a build of the openmsx emulator. I noticed SDL has different video drivers on Win32 (windibs and directx), and I decided to enable the latter in openmsx. The problem I'm trying to fix is that with the x64 compilation, SDL's calls to IDirectInputDevice2_SetDataFormat fails with E_INVALIDARG because the size fields in the c_df* structures aren't set correctly. Hence my report and suggested patch. This fix was submitted with revision 4486. Thanks! |
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. Thanks.