| Summary: | some improvements for the new windows DirectInput joystick code | ||
|---|---|---|---|
| Product: | SDL | Reporter: | David Gravereaux <davygrvy> |
| Component: | joystick | Assignee: | Sam Lantinga <slouken> |
| Status: | RESOLVED FIXED | QA Contact: | Sam Lantinga <slouken> |
| Severity: | trivial | ||
| Priority: | P2 | CC: | davygrvy |
| Version: | 2.0.0 | ||
| Hardware: | x86 | ||
| OS: | Windows (XP) | ||
| Attachments: |
patch file
latest |
||
|
Description
David Gravereaux
2006-11-06 19:27:21 UTC
Created attachment 180 [details]
patch file
patch file
you might want to push this through prettyprint after applying. And I think SVN messed up CRLF on checkout for me.. Tnks. I forgot. dinput.lib needs to be added to the link in the build scripts. We don't actually, need an implicit link to dinput.dll (no calls are made to any of the functions it exports), but there's a symbol (a constant structure) in it we need. Please disregard the attached patch as it stands. I'll attach a new one when I solve some problems I found using a Saitek Cybork EVO Force joystick. Created attachment 181 [details]
latest
Ok, error messages all fixed and tested with a force joystick. A sample error message is the following:
Couldn't initialize SDL: IDirectInput::Initialize() [ERROR_OLD_WIN_VERSION & DIERR_OLDDIRECTINPUTVERSION]: The application requires a newer version of DirectInput.
To get proper error messages I had to use DXGetErrorString9() and DXGetErrorDescription9() which are found in the static library dxerr9.lib of the DirectX v9c SDK.
I'm not sure if this passes the mustard test for you guys. Please contact me regarding this change. SDL never had to use DX SDK stuff before, but this was only way I could find to get good error messages as bone minimum VC++6 only supports DirectX v5
Bumping a bunch of bugs to Priority 1 for consideration for the 1.2.12 release. --ryan. Dropping to Priority 2 (that is, not for the 1.2.12 release) since this changes some basic assumptions and requirements (directinput linking, etc). We'll talk about this again for the 1.3 branch, though. --ryan. I already have this in my 1.3 working tree, pending some cleanup. These changes have been in for a long time, and I forgot to close the bug. Whoops! :) Thanks! statically linking with dx9err.lib not possible to get better error messages through DXGetErrorString9() and DXGetErrorDescription9() ? Yes, it is, but I'm trying to avoid requiring you to link with any DirectX static libs. |