Skip to content

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