Gamepad axes and buttons work in Chrome Dart2js but are null when run in Dartium #15119
Labels
area-core-library
SDK core library issues (core, async, ...); use area-vm or area-web for platform specific libraries.
closed-obsolete
Closed as the reported issue is no longer relevant
library-html
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
The text was updated successfully, but these errors were encountered: