Skip to content

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