Hey guys!
So I'm trying to write an input manager for a game engine I'm writing for a senior project in SDL. However, I'm having some issues. Namely detecting button presses in the current frame. I'm using the SDL Game Controller functionality to attempt to do it (as opposed to the Joystick functionality).
So. Anyone have any suggestions on how to do this? Basically, I wanted to model it similar to XNA's Gamepad and Gamepadstate classes... (see here: http://msdn.microsoft.com/en-us/library/bb313875.aspx)but I'm not really sure about how to do it, and the lack of documentation (to my knowledge) of SDL 2's Game Controller functionality has made this rather hard.
Later today I can post some code I have of just getting button presses that are basically read multiple times a frame (as in I press and release and if it's meant to print something to cout it will do it like 10 times just as an example), but I have a feeling it won't be much use for doing it the correct way.
I'm not looking for straight-up code, but more for a discussion on how to go about doing this, possibly with input from somebody who's got some experience using the Game Controller functionality of SDL 2.
Thanks a ton!