Skip to content

Joystick support (final) #54

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 57 commits into
base: master
Choose a base branch
from
Open

Joystick support (final) #54

wants to merge 57 commits into from

Conversation

seclorum
Copy link

I've re-implemented Joystick support, substituting joystick.count for JOYSTICKS, and re-working the API that was added to be more generally useful outside the scope of Joystick handling.

Joystick rescan is done whenever switching to the editor, meaning end-users can plug joysticks in and re-start their games if needed. Also dynamically adding up to 8 (hard-coded limit of SDL handles reserved) joysticks at rescan. Button support is included.

To use:

joystick.count = number of joysticks detected
joystick[1].x / joystick[1].y = x/y axes
joystick[1].button = 1 for down, 0 for up

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants