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
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