Jump to content

  • Log In with Google      Sign In   
  • Create Account


Controller Input with SDL 2.0 Help


Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.

  • You cannot reply to this topic
No replies to this topic

#1 c_fried_rice   Members   -  Reputation: 163

Like
0Likes
Like

Posted 15 October 2013 - 03:49 AM

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!

 



Sponsor:



Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.



PARTNERS