I am pleased to report that thanks to some homework on my part and
the kind offices of Richard Rauch the "freeglut" joystick code now works
properly under Windows. The code checks for joysticks with "ident" values
(whatever those are) of zero and one, and any available joystick triggers a
callback. (This will cause trouble when you have two separate joysticks,
but "freeglut" never supported that in the first place.)
Incidentally, I also modified the "CallbackMaker" demo so that it
displays text in a graphical window rather than forcing the user to capture
the scrolling text in the startup window.
There are now three issues outstanding:
(1) Somebody needs to test the joystick code under any other
supported operating system.
(2) We need to figure out what to do with the API to support
multiple joysticks properly.
(3) In order to force a link to a particular windows
library, I added a "#pragma" statement. I realize that this may be
controversial and I would like to know whether I need to take it out.
John F. Fay
From: Nigel Stewart <nigels@ni...> - 2004-02-10 03:15:08
> (3) In order to force a link to a particular windows
> library, I added a "#pragma" statement. I realize that this may be
> controversial and I would like to know whether I need to take it out.
I suggest wrapping it only for the microsoft compiler as follows: