On Sun, Oct 24, 2010 at 9:40 PM, Kai Sterker <kai.ster...@gmail.com> wrote:
> That would be good. I've seen that there is code that tries to convert > repeated events as you might get from keeping a button pushed into a > single event. Maybe something is fishy with that. Have a look at > src/input/sdl/manager_sdl.cc, starting from line 561. Should be simple > to debug with a gamepad around to trigger the events as needed. Here's my suspicion (src/input/sdl/manager_sdl.cc:566): int axisnbr = (event.jaxis.axis << 1) + (event.jaxis.value > 0); SDL itself references each axis with a number from 0 to n. We, however, split that into two numbers (left/right, up/down). And here's the flaw. If you have a digital gamepad, then I'd imagine that you always get a value of 0 for the neutral position. In that case, the axis number calculated above is only right in one direction. Since the state of the wrongly calculated axis is already released, no event is fired and the state of the correct axis is not reset. So when you press again, we look into our table and see that the axis is already pressed, hence we do not fire another event. And that explains exactly the behaviour you are seeing. On pushed event, then silence ... Now as to a fix ... I guess a value of 0 will have to check both axis (and release the one that is pushed, if any). Would be cool if you could try the new implementation. Sorry if I was too fast to give you a chance to debug. But the issue suddenly was clear to me (I hope!) and I just had to give it another look. Kai _______________________________________________ Adonthell-devel mailing list Adonthell-devel@nongnu.org http://lists.nongnu.org/mailman/listinfo/adonthell-devel