Mantis - Squeak
Viewing Issue Advanced Details
5650 OS-Linux minor always 12-19-06 08:05 04-15-07 22:06
matthewf  
 
normal  
new  
open  
none    
none  
0005650: No Joystick support on Unix machines
PrimitiveJoystickPlugin has a null implementation on Unix.
Attached is the new trunk/platforms/unix/plugins/JoystickTabletPlugin/sqUnixJoystickTablet.c
Also attached is a C script that acts as a stand-alone unit-test for sqUnixJoystickTablet.c.
 sqUnixJoystickTablet.c [^] (4,221 bytes) 12-19-06 08:05
 joytest.c [^] (1,111 bytes) 12-19-06 08:05

Notes
(0008727)
matthewf   
12-19-06 08:20   
Issues with this implementation:
- /dev/input/js* is hard-coded as the appropriate file
- reads the joystick even if Squeak does not have X input focus
- assumes that the kernel always reports axis values as signed 16-bit integers (-32768...32767)
- cannot handle over 32 buttons
- assumes the existence of linux (will probably not work on bsd or sun)
- it accesses the kernel directly; perhaps it should use XINPUT, SDL, or HAL

I do not know if any of these assumptions are justifiable.
(0010553)
matthewf   
04-15-07 22:06   
An email about the current Joystick framework:
http://lists.squeakfoundation.org/pipermail/squeak-dev/2002-January/032596.html [^]