Skip to content
New issue

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

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

Already on GitHub? # to your account

add gamepad input example #27

Merged
merged 2 commits into from
Jun 1, 2022

Conversation

jakkos-net
Copy link
Contributor

For issue #26

I converted over a minimal version of this https://github.com/raysan5/raylib/blob/master/examples/core/core_input_gamepad.c example.

image

@chengchingwen
Copy link
Owner

I would need some time to test it. Currently it doesn't work on my linux with Xbox joystick, I would need to check if that is a problem of my computer.

Co-authored-by: Peter <adgjl5645@hotmail.com>
@jakkos-net
Copy link
Contributor Author

I would need some time to test it. Currently it doesn't work on my linux with Xbox joystick, I would need to check if that is a problem of my computer.

The screenshot I supplied was with a wired PS4 gamepad on a Windows machine. I can try on my Linux machine tomorrow.

@chengchingwen
Copy link
Owner

Seems to be a problem of missing gamepad mapping. Follow up the similar issue on raylib, I find a mapping from the DB and set it with Raylib.SetGamepadMappings, then it does work. I'm not sure it's because I'm using a weird joystick or there are some problems when we build the library so the mapping are missing.

@foldfelis Do you happen to have a Xbox joystick with you? I would like to make another test.

@jakkosdev I think after you can confirm that your PS4 gamepad also works on Linux, we could merge this example.

@foldfelis
Copy link
Collaborator

@chengchingwen yes, I have one XD. I can help with the tests.

@foldfelis
Copy link
Collaborator

@chengchingwen yes, I have one XD. I can help with the tests.

I have tested it on Windows, it works like charm

@chengchingwen
Copy link
Owner

@foldfelis What about Linux?

@foldfelis
Copy link
Collaborator

I don't have a Bluetooth adapter on my Linux machine 😭

@chengchingwen
Copy link
Owner

@jakkosdev We might still need you to test it on Linux, if you are ok with it.

@jakkos-net
Copy link
Contributor Author

@jakkosdev We might still need you to test it on Linux, if you are ok with it.

I can't access my Linux machine at the moment as I'm self-isolating. If you still need me to test once I have access again, I will test it.

@chengchingwen
Copy link
Owner

Sorry to hear that.

It would be great if you can still test if after you have access again. For now I'm going to merge this example and track the problem in another issue. Thanks for the PR!

@chengchingwen chengchingwen merged commit 3ef2133 into chengchingwen:main Jun 1, 2022
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants