root/trunk/orca/gl/js.r
| Revision 1, 305 bytes (checked in by krobillard, 3 years ago) |
|---|
| Line | |
|---|---|
| 1 | |
| 2 | if system/os = 'linux [ |
| 3 | dev: read %/dev/input |
| 4 | js: [] |
| 5 | forall dev [ |
| 6 | if find first dev "js" [ |
| 7 | append js first dev |
| 8 | ] |
| 9 | ] |
| 10 | if empty? js [print "No joysticks found" quit] |
| 11 | probe js |
| 12 | ] |
| 13 | |
| 14 | js: open 'joystick |
| 15 | |
| 16 | forever [ |
| 17 | if read js [ |
| 18 | print js/input |
| 19 | ] |
| 20 | ] |
Note: See TracBrowser
for help on using the browser.
