You get a device removed, whose event.which contains an instance IDĪt the moment, when I open a device, I immediately get its instance To keep the SDL_GameController pointer around so you can close it if Short form: Device addedĮvent.which contains the device index to open the thing. The major thing testgamecontroller does NOT do yet, even in my code, Hopefully become IMO a much better example!) (which I am completely rewriting?within the next week or so, it will
Ought to get back to writing it at some point soon.įor some idea how to use it, have a look at test/testgamecontroller.c Rest of the world), but that’s a documentation issue and I really The API’s a little verbose in its naming and enums, and the functionsĪll use Microsoftian lolomgwtfbbqVAR naming (which Sam won’t let meĬhange into reasonable and descriptive names that make sense to the Any XInput-compatible device will just workįor you using that API and be automatically and correctly mapped. Now, regarding SDL: If you want to use an XBox 360 controller (orĪnything that is basically close enough), SDL 2.x has a great optionįor you: GameController. I have kind of made the joystick subsystem a hobby of mine lately? I might be willing to get one?they tend to be like $10 on Amazon. Which RetroLink pad have you got? I don’t have one here to test, but
Intelligent thing in its GameController API. Despite this idiocy, you’ll find SDL does the If you want to know what I mean byĪnd then curse them for ever and ever for deliberately making Regarding the joystick mapping differently under XInput versusĭirectInput: Blame Microsoft. With this done, all of my problems using these gamepads are gone. I discovered the older MM implementation and enabled it by doing the Their drivers simply refuse to report all buttons or axes). (especially because many new controllers don’t work properly with it.
Subject: Re: Joystick behaviour seriously flawed?Įxcept… that driver has just been removed in newer versions Was trying to represent it as a system with 5 axes, that’s a bug.
It has 6 axes (2 for left stick, 2 for right stick, 1 for each trigger) and so if it …such as an XBox controller clone, which is what was originally mentioned. It does not have a hat, the d-pad is 2 axes, and all the buttons are coming through correctly.
I tried 3 different gamepads with the SDL2 joystick system under Windows 7, and I’m getting some rather bizarre results.