1
Window / GetEvent always returns true
« on: December 31, 2009, 02:45:30 am »
Just a little update:
It turned out that it was the JoyMoved event that bombarded my loop, and I don't have a joystick connected to the PC. I seem to remember reading about this somewhere a long time ago but I cant find it right now.
Anyway, if anyone else using linux have this problem when they disconnect the joystick it would be interesting to know.
[edit]
Using the jstest utility from the joystick package it turns out that the /dev/input/js0 device thinks it detects a joystick, even though it is the mouse:
I guess this is a kernel or driver issue, as you suggested
It turned out that it was the JoyMoved event that bombarded my loop, and I don't have a joystick connected to the PC. I seem to remember reading about this somewhere a long time ago but I cant find it right now.
Anyway, if anyone else using linux have this problem when they disconnect the joystick it would be interesting to know.
[edit]
Using the jstest utility from the joystick package it turns out that the /dev/input/js0 device thinks it detects a joystick, even though it is the mouse:
Code: [Select]
# jstest /dev/input/js0
Driver version is 2.1.0.
Joystick (Microsoft Microsoft® SideWinder™ X5 Mouse) has 36 axes (X, Y, Z, Rx, Ry, Rz, Throttle, Rudder, Wheel, Hat0X, Hat0Y, Hat1X, (null), (null), (null), (null), (null), (null), (null), (null), (null), (null), (null), (null), (null), (null), (null), (null), (null), (null), (null), (null), (null), (null), (null), (null))
and 7 buttons (BtnThumbL, BtnThumbR, LeftBtn, RightBtn, MiddleBtn, SideBtn, ExtraBtn).
Testing ... (interrupt to exit)
...
I guess this is a kernel or driver issue, as you suggested