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

Add some joystick functions to input. Enables manipulation of mapping… #3272

Merged
merged 1 commit into from
Jan 12, 2016

Conversation

27thLiz
Copy link
Contributor

@27thLiz 27thLiz commented Jan 8, 2016

…s at runtime

The following functions were added to Input:

add_joy_mapping(String mapping, bool update_existing) and remove_joy_mapping(String guid) for manipulation of gamepad mappings.

bool is_joy_known(int device) defaults to true on all platforms that don't use the remapping code. Otherwise, checks whether the device is mapped.

get_joy_guid(int device) returns the sdl2 device guid if using remapping, defaults to "Default Gamepad"

I also documented these and the other joystick related functions. doctool updated quite a bit of things unrelated to this, I hope that's not a problem.

Also I hope the implementation is ok. I added is_joy_known and get_joy_guid to OS for the default variants. Platforms that use the remapping then override these to call back to InputDefault

@27thLiz
Copy link
Contributor Author

27thLiz commented Jan 8, 2016

You can get my remapping project to get gamepad mappings without having to use external tools ;)
I didn't include it as the code is a bit ugly right now..
Also I don't know if that really fits the purpose of a demo, it's more of an utility.

@reduz
Copy link
Member

reduz commented Jan 10, 2016

uh was this closed before? I closed it by accident

@neikeq
Copy link
Contributor

neikeq commented Jan 10, 2016

No, it was not closed before that commit.

@akien-mga akien-mga reopened this Jan 10, 2016
punto- added a commit that referenced this pull request Jan 12, 2016
Add some joystick functions to input. Enables manipulation of mapping…
@punto- punto- merged commit 7393e40 into godotengine:master Jan 12, 2016
@27thLiz 27thLiz deleted the joy-binding branch July 30, 2016 14:06
@aaronfranke aaronfranke added this to the 2.0 milestone Jan 26, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants