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

Gamepad axes and buttons work in Chrome Dart2js but are null when run in Dartium #15119

Closed
DartBot opened this issue Nov 16, 2013 · 4 comments
Closed
Labels
area-library closed-obsolete Closed as the reported issue is no longer relevant library-html

Comments

@DartBot
Copy link

DartBot commented Nov 16, 2013

This issue was originally filed by rstol...@gmail.com


What steps will reproduce the problem?

Run the code below and press some buttons on your gamepad. The example output below is from a 360 controller.

void _frame(num time) {
  List<Gamepad> gamepads = window.navigator.getGamepads();
  for(Gamepad gamepad in gamepads) {
    if(gamepad != null) {
      print("ID:${gamepad.id} Idx:${gamepad.index} Axes:${gamepad.axes} Buttons:${gamepad.buttons}");
    }
  }
  
  window.animationFrame.then(_frame);
}
void main() {
  window.animationFrame.then(_frame);
}

What is the expected output? What do you see instead?

In Chrome (dart2js) I get this..

ID:Xbox 360 Controller (XInput STANDARD GAMEPAD) Idx:0 Axes:[-0.10887312144041061, -0.04594491422176361, -0.03678950294852257, -0.053299762308597565] Buttons:[0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]

In Dartium i get this...

ID:Xbox 360 Controller (XInput STANDARD GAMEPAD) Idx:0 Axes:null Buttons:null

I expect the axes and buttons to not be null in Dartium.

What version of the product are you using? On what operating system?
Dart SDK version 1.0.0.3_r30187
Windows 7 64-Bit
Chromium 31.0.1650.39 (1593)

Please provide any additional information below.

Chrome 31.0.1650.57 is what was used to test dart2js

@sethladd
Copy link
Contributor

Added Area-HTML, Triaged labels.

@kevmoo
Copy link
Member

kevmoo commented Apr 7, 2014

Removed Area-HTML label.
Added Area-Library, Library-Html labels.

@DartBot
Copy link
Author

DartBot commented Jan 7, 2015

This comment was originally written by @Fox32


Related, if not the same: Issue #13844

@alan-knight
Copy link
Contributor

Seems to work in Dartium in 1.8. But I think I need to test this gamepad in more detail to verify that it's working properly :-)


Added AssumedStale label.

This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area-library closed-obsolete Closed as the reported issue is no longer relevant library-html
Projects
None yet
Development

No branches or pull requests

4 participants