Skip to content
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

Joystick support #107

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

Joystick support #107

wants to merge 3 commits into from

Conversation

BitterlyIronic
Copy link

Patches in support for joystick controls via SDL. It's a little wonky due to the way GearHead uses input and due to me not wanting to do a significant rewrite just for a feature I'm not sure anyone else would want.

There's a configuration UI that can be accessed in-game to map your controller buttons, and it supports mapping hats and axes. The hard-coded defaults should hopefully work for an Xbox 360 controller. The actions mapped to each button can be changed in the config file. The main analog stick axes can be (only) set in the config file, and I've aped the control scheme used by games like Tangledeep, where you select a square with the analog stick and press A to confirm the movement. All buttons repeat if held, also.

There's also a minimal on-screen keyboard that can be enabled via the config file, so that it should be at least technically possible to play the game without needing anything other than a controller.

Finally a simple resolution menu is buried in the play options, mostly so that it's possible to do fullscreen at a resolution other than 800x600.

There are a couple other little tweaks here and there because I couldn't help myself, but nothing that should impact anything.

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.

1 participant