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

added XBox controller mapping for Chrome under Linux #7

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

Conversation

panzi
Copy link

@panzi panzi commented Aug 9, 2012

The XBox controller has the same layout under Linux as under Windows (in Chrome - couldn't get gamepads to work with Firefox), except it exposes one button more: the XBox button. I just mapped it like this: into.xboxButton = raw.buttons[16]; I guess this button has a special function and cannot be used under Windows? Under Linux it's a button as any other.

Also I've fixed a typo (on one place raw was written as Raw), added missing semicolons (;) and limited the framerate of the example to 30fps in order to reduce CPU usage.

@inequation
Copy link

Sorry to spoil your fun, but... You put your code in the wrong file. ;) gamepad_uncompressed.js is just an intermediate file, changes should be made to gamepad_no_images.js and then build.py should be run. Check out my fork to see the differences, specifically commits 480b5b3 and 398ab39.

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