[ Thread Index |
Date Index
| More lists.liballeg.org/allegro-developers Archives
]
I've been working on implementing the new joystick API on the
new_api_branch. I've been trying to work within a similar framework as
Allegro currently has, but I don't think it fits that well.
The problem is like this. In the new API there is a function:
int al_num_joysticks();
which can be called at any time. Allegro has a list of joystick
drivers. When al_num_joysticks() is called, there may not be a joystick
driver installed. So do I find a working joystick driver, initialise
it, ask it the number of joysticks on the system, then shut down the
driver again?
More background: joysticks are to be (un)installed using the functions:
AL_JOYSTICK *al_install_joystick(int joystick_number);
void al_uninstall_joystick(AL_JOYSTICK *js);
Right now I'm planning for the joystick driver to be initialised when
the first joystick is installed, and shut down when the last joystick is
uninstalled.
BTW, what advantages does the normal Win32 joystick driver have over the
DirectX joystick driver?
Peter