View Full Version : SDL Polling vs ??
23-03-2011, 09:07 PM
What other techniques in SDL besides polling the events can i use to handle input? Is SDL_PollEvent really the best option?
I believe Event Polling is the only method of getting accurate input through SDL. You can of course build a controls interface that will track the states of all your gamepads' game buttons and directional controls, mouse a keyboard input, like I and many others have. This will make designing the game controls of your game much easier as you develop your game.
01-04-2011, 09:52 AM
You can get the state of the keyboard, mouse and joysticks at any time. Use the following routines:
Joystick functions (scroll down) (http://www.libsdl.org/cgi/docwiki.cgi/SDL_API)
Hope this helps.
Powered by vBulletin® Version 4.1.10 Copyright © 2013 vBulletin Solutions, Inc. All rights reserved.