oneneil / javascript-joystick

Automatically exported from code.google.com/p/javascript-joystick
0 stars 0 forks source link

Switching Joystick Types Requires Firefox Restart #4

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
1.Run the Logitech G27 Racing Wheel as a joystick. (works)
2.Unplug the wheel, plug in the Logitech Attack3 joystick
3.Force a reload if desired.
4.Or: reverse 1&2; same outcome. 

What is the expected output? What do you see instead?
I was expecting that, at least upon a reload and consequent new Joystick() 
instance, the Attack3 would work. But a Firefox restart is required in between. 
Note that the Attack3 does work fine if it's used first.

I don't have another device to test with. But I suspect that the problem is 
reproducible with other joysticks. Maybe some close() operation is required 
once the USB disconnect is detected?

What version of the product are you using? On what operating system?
Latest version on Vista 64.

Please provide any additional information below.

Original issue reported on code.google.com by Paep...@gmail.com on 10 Jun 2010 at 3:13

GoogleCodeExporter commented 8 years ago
Upon further investigation I realized that every device is assigned to a 
different device slot, even if a new joystick instance is created. 
Consequently, in order to periodically check for joysticks being plugged in or 
unplugged, one needs to to loop through 'all' device slots. I believe that the 
win joystick API function for finding the maximum number of possible slots is 
currently not being passed through the JS API. (see separate Issues entry).

Original comment by Paep...@gmail.com on 13 Jun 2010 at 6:33

GoogleCodeExporter commented 8 years ago
This is a limitation of the Windows API. I'm leaving this as-is.

Original comment by cwoffen...@gmail.com on 10 Oct 2011 at 1:51